PDA

View Full Version : ABSOLUTE ALIGNMENT


Anonymous
03-26-2005, 08:53 PM
ok i have a design in photoshop and i need to be centered at all times. right now what is happening is if i edit my site so it is centered with one screen resolution and then switch to a higher one then the layout is no longer in the center of the page. i clicked align absolute middle and that still doesn't work. is there a code or somthing to make it centered no matter what? thanks.

mark

gmcrone
03-26-2005, 11:43 PM
For a pure CSS layout, start with this :

The HTML:
<body background="whatever">
<div class="wrapper">contents of page</div>
</body>

The CSS:
body {
text-align: center;
min-width: 770px; /* Use this, or */
}
div.wrapper {
text-align: left;
margin-left: auto;
margin-right: auto;
border: 1px solid white; /* this. Both are not necessary */
}
end of CSS

Anonymous
03-27-2005, 02:31 AM
my layout is not made css

gmcrone
03-28-2005, 02:32 AM
Even if your layout is not CSS based, using the previous CSS files will put your content inside a wrapper that will keep your content centered.

Mike...