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

Home Forums CSS [Resolved] Best approach to creating a horiz menu bar? Reply To: Best approach to creating a horiz menu bar?


Hi Michael,

I should point out that apart from the IE7 specific code in the conditional comments there were no actual hacks in the page so I’m not quite sure what you (or others) mean by hacks as such. The IE7 specific code is not something I would normally have used anyway as I felt it looked fine with simple borders. :)

The only validation error in the main css is from normalise.css and not the code I gave.

In the end its just basically two columns and the code is pretty clean for what it does. I’d be interested in knowing what others thought was hacky but I hazard a guess it would be their lack of understanding of CSS that falls short. Using :before and :after to add decoration elements is a perfect example of best use css and not a hack in any way.

As I said above you don’t really need to worry about what went before and just put the content in the columns as required.

Unlike your other example this page won’t break when text is resized because there are no fixed heights on the content and text can grow freely.