• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Border repeat and Page Centering Question

Wolfmyst

Weaksauce
Joined
Nov 10, 2005
Messages
126
I would like my website, which is based on a template, to stay in the middle of the window, as opposed to alligning itself to the left. So for example if you have a large monitor, and your browser is maximized, the page is centered in the middle. On the left and right are the backround color/texture. I did a lot of searching but all I could come up with was a css style to repeat the border. This didn't work because I couldn't figure out how to chop the backround in two. I'm using Dreamweaver 8 BTW.

Also does anyone know any really good books for Dreamweaver 8?
 
As far as centering the document goes, I would wrap everything within the <body>...</body> in a <div align="center">...</div>

As for the background, you can't really specify 2 different background images for the same HTML element (such as <body>). But, if your site is in a block-style layout, meaning the whole document is within a rectangular area, putting the whole thing in a DIV (as suggested above) will allow the body's background color/image to show on the edges.
 
Thanks, the web page is now centered, however there is a large gap of backround on the left side that doesn't shring when I make the window smaller.

Here is the beginning and end of my code:

<html>
<body>
<div align="center">
<head>
<title>

</table>
<!-- End ImageReady Slices -->
</div>
</body>
</html>


Is this right?
 
The head and title should come before the body, and they shoud also be closed. Post the site.
 
Wolfmyst said:
Thanks, the web page is now centered, however there is a large gap of backround on the left side that doesn't shring when I make the window smaller.

Here is the beginning and end of my code:

<html>
<body>
<div align="center">
<head>
<title>

</table>
<!-- End ImageReady Slices -->
</div>
</body>
</html>


Is this right?


Should be more like this:


<html>
<head>
<title>...INSERT TITLE HERE...</title>
</head>
<body>
<div align="center">
...INSERT DOCUMENT HERE...
</div>
</body>
</html>
 
Well one way to make sure everything stays centered in almost all browsers is this:

Make a div and put everything inside the div. for the styles put this: { margin-left:auto; margin-right:auto;}

then in the body tag put text-align:center; for a style. This actually tricks IE into centering everything on the page, but know that if you do that, you have to then use a text-align:left; for your content.

then just make a pattern background and make sure you repeat it..

hope that makes sense.
 
Thanks for the tips guys, I think I have it working, and I'll post the link as soon as I re upload it so you can see if everything is peachy.
 
Have you thought about scaling your site so that it will stretch or contract to use 100% of whatever dimensions the browser happens to be?

I am doing that with a site I'm developing at work, and having some success... although I owe part of that to being able to reduce the image-dependency of my top and left borders..

Now that I'm using a 19" 1280x1024 lcd, I'm really noticing all the sites that chain themselves to a precise pixel dimension and fail to use all the space available at high res. It's annoying, because if they'd only scale like I'm trying to, they would save me so much scrolling.

Another point in favor of scaling is that it goes both ways... if some poor schmuck stuck on a 12" CRT at 640x480 is trying to view your site, he will be a lot less frustrated than he's been on all those other sites that use 800 or 1024 wide top border graphics.

Edit: I just paid a visit, it looks pretty sharp so far. Only part that doesn't get a hearty thumbs-up from me (besides the suggestion to consider scaling ;) ) is the plain-table-iness of the main text section, and the text in the left cell looks a bit pinched.
 
I appreciate your comments. I don't know how to make it stretch, otherwise I would. I think it requires more know how to do though. What rescources are you using to learn how to stretch the page? Since I'm using a template, it's hard to alter once out of photoshop. As for the table, I agree. I am trying to figure out the best way to do things in that regard. I can remove the borders of the table and that might make things seem more open. I actually building this for someone with no web developing experience, and am trying to make it so he has no trouble editing any of the pages, I figured simple tables would be easiet.

Thanks again for the suggestions!

Shark-MegaByte said:
Have you thought about scaling your site so that it will stretch or contract to use 100% of whatever dimensions the browser happens to be?

I am doing that with a site I'm developing at work, and having some success... although I owe part of that to being able to reduce the image-dependency of my top and left borders..

Now that I'm using a 19" 1280x1024 lcd, I'm really noticing all the sites that chain themselves to a precise pixel dimension and fail to use all the space available at high res. It's annoying, because if they'd only scale like I'm trying to, they would save me so much scrolling.

Another point in favor of scaling is that it goes both ways... if some poor schmuck stuck on a 12" CRT at 640x480 is trying to view your site, he will be a lot less frustrated than he's been on all those other sites that use 800 or 1024 wide top border graphics.

Edit: I just paid a visit, it looks pretty sharp so far. Only part that doesn't get a hearty thumbs-up from me (besides the suggestion to consider scaling ;) ) is the plain-table-iness of the main text section, and the text in the left cell looks a bit pinched.
 
Back
Top