Forums

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

Home Forums CSS More efficient way of coding this layout Re: More efficient way of coding this layout

#132998
Paulie_D
Member

I’ve stripped out a lot of repeated CSS into classes and generally tidied up a bit and switched out some divs for HTML5 elements such as `header`, `nav` & `footer`

http://codepen.io/Paulie-D/pen/cGfoD

You have a **lot** of IDs in there. They aren’t really necessary for **every** element unless you are actually planning on styling them individually.

You don’t need to state `width:100%` on divs…that is their default size.

Finally, you mentioned that you want this to scale up to the max size but you have listed a max-width of 960px. That’s fine if that is the maximum size you want to support…otherwise you can lose.

Naturally, you might want to consider media queries when scaling down.