5 Responsed To This Post
Subsribes to this topic Comment RSS or TrackBack URL
mygif_alt
Andy Ford Says, in 5-31-2007 at 22:03:50 from 64.243.137.2    

varun,
Thanks for this post. The more that people discuss this, and writing about it on the web – the better.

I think your first example could be minimized a bit more (might depend on the situation). Assuming that div#header only contains the following content:

[div id="header"]
[h2]Site Name[/h2]
[span class="tagline"]tagline[/span]
[/div]

You could further reduce the tagline like so:

[em]tagline[/em]
or
[p]tagline[/p]
or another element such as strong, b, etc

then your CSS rule might look like:
#header em{/*whatever*/}

Actually, you might even be able to get away with no element wrapping the tagline at all by applying the styles just to #header and #header h2… but you’d have to be careful about the h2 inheriting unwanted styles.

mygif
skeller Says, in 6-5-2007 at 10:20:15 from 209.121.215.134    

an even better solution, set a width on the ul to be like 600px and make each li say 200px and float them left, of course you have to clear the ul..

col1
col2
col3
1
varun
varunkrish.com
2
google
google.com

mygif_alt
varun krishnan Says, in 6-5-2007 at 11:03:10 from 220.227.31.66    

@Andy

thanks for the feedback

yes.. it can be further simplified.. My idea was to eliminate the importance of dropping unnecessary markup.

mygif
varun krishnan Says, in 6-5-2007 at 11:05:07 from 220.227.31.66    

@skeller

awesome suggestion.. Gives me 1 more reason to eliminate tables.Thanks for reminding.

mygif_alt
Soft Review » Recommended XHTML and CSS Practices Says, in 11-22-2007 at 22:59:17 from 88.214.192.28    

[...] read more | digg story [...]

Leave A Reply

 Username (*required)

 Email Address (*private)

 Website (*optional)

Inform me when someone post new message here

Please Note: Comments Moderation maybe active so there is no need to resubmit your comment
Web Analytics