PDA

View Full Version : Alignment



Hein
Feb 22nd, 2012, 01:19 PM
What would the code be for two different kinds of alignment.
The one like this forum as you zoom out everything stays in place in just gets smaller and like if you zoom out it's like an a4 page like http://www.w3schools.com
I hope this makes sense?

clausrei
Feb 22nd, 2012, 04:09 PM
I would say, CodingForums.com didn't gave his container a width and w3schools.com did.


.container {
width: 975px;
}


But what I would like to know in this context is why are the html templates in Dreamweaver calles "fixed" and liquid". Because a liquid html template has also a max width attached to it, but you can zoom in and out like on fixed html template.
Example:


.container {
width: 80%;
max-width: 1260px;/* a max-width may be desirable to keep this layout from getting too wide on a large monitor. This keeps line length more readable. IE6 does not respect this declaration. */
min-width: 780px;/* a min-width may be desirable to keep this layout from getting too narrow. This keeps line length more readable in the side columns. IE6 does not respect this declaration. */
background: #FFF;
margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout. It is not needed if you set the .container's width to 100%. */
}