Click to See Complete Forum and Search --> : My entire layout is inefficient, help!
Pilot-Doofy
07-20-2007, 12:49 AM
I know my whole layout is really inefficient in terms of CSS and (X)HTML. I was wondering if you guys could help me. Could you post source to a layout that is exactly the same as the one up now (using the same images and what not) with less source?
As simple as the layout is, it seems like it could be in a very few amount of divs. Keep in mind the minute amounts of ajax thrown in. Thanks in advance.
Edit: I forgot the link:
http://scriptsyndicate.org
amberfrances
07-20-2007, 04:59 PM
Call me old fashioned, but seems like a lot of that could be eliminated by using a table or two?
WebJoel
07-20-2007, 06:06 PM
There are quite a few non-semantic elements & tags used here. I could removed all those "br" tags, and markup using <p></p>(which is the correct tag to use for a 'paragraph' -thus eliminating the need for 'line breaks'. And the paragraph's text-size can be better controlled x-browser because it can be styled:
p {font-size:1.0em; margin:14px 0 10px 0; etc}
--
I see a 'divider DIV' or two also. -No need for these... merely give the DIV above it a "margin-bottom:20px;" (or the DIV below it a "margin-top:20px;"). Or better yet, -a global definition of any container-"div" in the STYLE, like:
div {margin:10px;}
and not have to worry about any DIV coming any closer than 20-pixels of any other DIV. (sum of the two adjacent margins = 20px).
Consolidating and letting inheritance work, this document could probably be reduced in size by 25-40% maybe.