View Single Post
Old 08-16-2007   #14 (permalink)
notjustgraphics
Rusty Bio-Hazard!
 
notjustgraphics's Avatar
 
Join Date: Sep 2006
Location: Toronto, Ontario, Canada
Posts: 1,162

Send a message via MSN to notjustgraphics
Hey avisioncame

Here's a simple run down on Parent/Child Divs

<div id="parent">
<div id="child">
</div>
</div>


As you can see, the child is contained wholly within the parent div.

As for creating an elastic or liquid design, it's no lightweight task to force a div to the centre.

In order for the browser to determine the centre it most know the width of something.

The easiest way to achieve a faux centre, would be to use a left margin with a width expressed in em instead of px...

ie:

width:4 em;

This will give the left column 4 equal measures of the width of the window.. so if the window get's narrower, the div gets narrower.

You could use a liquid left column to position the centred div accordingly.

The problem with elastic or liquid designs is that they ALL have a breaking point where the design breaks down and things get messy.

Of course, for maximum effectiveness, you need to adjust your font sizes to em's as well.

Best of luck!

Mike.
__________________
notjustgraphics is offline