Hi Janine,
I have a silly basic question that I can’t find the answer to. I would like to have my website center in whatever browser/monitor size a user has, and I cannot find how to do this in any Adobe help menus.
Can you help me?
Jessica
Ferndale, Michigan
Dear Jessica,
It is a little tricky, but easy once you understand how…
First, you need to add a div tag to your design that contains everything else on the page. A good way to do this is to start the div just after the <body> tag and end it just before the </body> tag. Then create a style. A common style name for this purpose would be #container or #wrapper.
Then you define a style for #container and here’s the trick. You don’t center the div; you set the left and right margins to Auto. This setting automatically creates equal margins on each side of the main #container div, which effectively centers the div and, by extension, everything inside it.
If you’re using Dreamweaver CS3 or CS4, you’ll find the margin settings in the CSS Rule Definition dialog when you create a new style. Click to select the Box category, deselect Same For All under Margin, and then select Auto in the Left and Right Margin fields.
Hope that helps and I wish you all the best,
Janine
Still want more? Visit the Dreamweaver Help Center at www.DigitalFamily.com/dreamweaver to find Dreamweaver tips, tricks, and tutorials.



0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
You must log in to post a comment.