Link to home
Start Free TrialLog in
Avatar of crp0499
crp0499Flag for United States of America

asked on

Dreamweaver CS5, centering on the page

ok, I want to create a web page that is no larger than 1024 by 768 no matter what size monitor or res screen my viewers use.  I want it centered top/bottom and left/right in the browser window.

having the devil figuring that out.

I've tried dropping my pic into a blank page and centering and I've tried dropping in a table and now I'm googling the DIV option.

would love some help here and please, I"m working in design mode and don't really want to type in any code.

thanks

cliff
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

>> I"m working in design mode and don't really want to type in any code.


At some point you are going to have to learn the codes to get what you want.  Design Mode does not allow everything.

>> I want to create a web page that is no larger than 1024 by 768 no matter what size monitor or res screen my viewers use.  I want it centered top/bottom and left/right in the browser window.

Do you want it always at 1024 x 768 (which is wrong by the way...you need to consider the pixels removed by the browser toolbars and scrollbars) or do you want it to max out at those dimensions?
Avatar of crp0499

ASKER

i can type and work in HTML. i don't want to and I'm willing to seek out and learn alternate methods to achieve my goals without having to.

I want the page to always be 1024x768 and centered top/bottom and left/right.  So, if my viewer has a screen res of 1024x768 then their screen is full and if my users has a huge screen with a huge res, i want my tiny little 1024x768 page to be right in the middle of their screen.

:)
Okay, the size is easy.

On your page, you need to insert a div that starts and stops with the body tag.  

<body>
<div>
rest of page code here
</div>
</body>

If you select the whole page and do Insert | Layout Objects | Div you will get what you want.  DW will prompt for a CSS class or ID.  Create a new ID named "container" and give it the following CSS properties:

width: 1024
height: 768
margin: auto

That will center it left/right at those dimension.  Give me a couple of minutes to research vertical centering.
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of crp0499

ASKER

works perfectly.  thank you.  :)