The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS laying out a simple header Re: laying out a simple header


For the header ‘blocks’ I would tend to use floats but I’m moving more and more towards inline-block.

Alignment is so much easier (vertically and horizontally) with inline-block and centering menu list items is a breeze.

Yes, there are some issues (whitespace for one) but once you know the workarounds it’s very simple **and** you don’t need to remember a clearfix.

What I would suggest, is…try it both ways and see which you prefer and find the easiest to handle for this project. Sometimes, floats would be the best way to achieve the design, sometimes, inline-block.

Quite often, it’s a combination of multiple techniques.

Certainly all of the currently used ‘layout’ methods are valid in their own way and there is no harm in using any one of them in the right place for the right reason.

Over-reliance on any single technique or method is where so many (in one person’s opinion) new coders go awry.