I'm thinking along the lines of selectors, is it a good idea to chain selectors? i.e.


It's a powerful trick and keeps things DRY/slim. It just feels wrong!

Also, I've generally been using transparent png's for everything, (just in case design/client changes) which has been nice but I wonder about a perfromance overheads caused by this.

I've been making good use of the >, + selectors as well as :first-child which has been great too, I underestimated their power. I wonder if there is anything else out there that people are dying to throw into their sites but are not due to IE6, that I may be able to make use of.


3 answers

Doug 1095

A great way to avoid some images altogether is using alpha transparency for background colors:

.whatever { background-color: rgba(0,0,0,.5); }

Not sure off the top of my head which browsers currently support, but most of the good ones do at least.

Also, there's the video tag, of course.

I haven't noticed a performance problem from transparent PNGs, but I do see a performance hit when these are combined with a fixed background image!

Answered over 9 years ago by Doug

Hi Doug, Glad to hear that you have not experienced (generally) with transparent PNG's, regarding your other points, perhaps I didnt make myself clear:

I need to support IE7, and I don't want to spend time creating fallbacks for features that IE7 can't deal with, such as the HTML5 video tag.

What I really want to know is, what CSS and HTML tools are now available (that are going to make my life considerably easier), that are not available when supporting IE6.

I can only think of chained and advanced CSS selectors (>, +, and first:child), but I'm sure there's more, and I'm still not convinced chained selectors are a good idea.

Answered over 9 years ago by nine_toes

min-width, min-height are a good example of what I'm looking for - two I forgot!

Answered over 9 years ago by nine_toes