View Full Version : absolute, inherit, and relative position in CSS

Jan 21st, 2007, 08:22 PM
I have validated the code and the css. But some of the coders that helped me earlier said i should not set all my position to absolute. IF i don't set them to absolute then how do i get the page <div> to stay in their correct positions?

Jan 21st, 2007, 09:09 PM
You should used floats and margins. Let things flow naturally. If you need more than one div on the same line then float them.

Floatutorial (http://css.maxdesign.com.au/floatutorial/)

Jan 21st, 2007, 10:16 PM
I think we should be a bit more pragmatic here, and say that it really depends on the layout in question.

There's really no hard and fast rules as to which to use, and a lot of layouts will use a combination of every positioning method you can mention.

This element may be floated, and then within that, another element may be positioned absolutely or relatively, or it may be positioned with margins or padding etc. etc.

As Aero suggests though, floats and margin have proven a fairly robust (though not without problem) way of laying out the main blocks of a web page.

Absolute positioning has a reputation of being a victim of it's own power - though it still definately has it's place, and shouldn't be disregarded completely.

Kind regards,


Jan 22nd, 2007, 06:45 AM
Hello Besouro,
Here is a start at a floated solution of your site: http://www.nopeople.com/Besouro/