• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Positioning etc


Senior Member
Anyone got any good tutorials to break down the use of when to use the different types of positioning and/or floating? I know the basics and I'm just doing it by trial and error at the mo, but would like to know what is the best practice for things like nav bars, footers etc.

Any decent links would be helpful. :D

Here is a link: Learn CSS Positioning in Ten Steps: position static relative absolute float

Two invaluable tips:

Setting Position relative/absolute:

<div id='container' style='position:relative'>
<div id='innerElement' style='position:absolute'>

With the above setup the inner element can be positioned anywhere inside the container div - dead useful.

When using float you must set the widths of the floated elements and then use margins to position the elements, that's about it!! Don't forget that when adding padding to elements you need to reduce the width of it by the amount of padding, especially if elements butt up to each other.

Hope that helps