[css-d] List background in IE 6 and earlier and condition comments
Hi, I am new to this dicussion board and this is my first question. I'm following a tutorial in a book about creating horizontal navigation. Because IE 6 and earlier does not support the first-child element, the books recommends to apply a class to the list item to remove the background image in these browsers. Using conditional comments to apply this workaround seems best, but I cannot figure out why the background still appears in IE6 and earlier. T he rule in my conditional comments style sheet is: #breadcrumbs #list-first { background: none; } I think I also tried just #list-first, as well as a class, .list-first. The conditional comments is linked AFTER my main style sheet. URL: http://home.comcast.net/~adamq/chapter5/breadcrumb-navigation/breadcrumbs.html Thanks. __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] List background in IE 6 and earlier and condition comments
adamq wrote: ... Because IE 6 and earlier does not support the first-child element, the books recommends to apply a class to the list item to remove the background image in these browsers. Using conditional comments to apply this workaround seems best, but I cannot figure out why the background still appears in IE6 and earlier. T he rule in my conditional comments style sheet is: #breadcrumbs #list-first { background: none; } I think I also tried just #list-first, as well as a class, .list-first. The conditional comments is linked AFTER my main style sheet. URL: http://home.comcast.net/~adamq/chapter5/breadcrumb-navigation/breadcrumbs.html There is no bg image visible on the first LI in a native IE6 install, and tracing the stile shows that IE6 applies the above fix. I think the problem is how you test in IE6. Ingo -- http://www.satzansatz.de/css.html http://www.dolphinsback.com __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] List background in IE 6 and earlier and condition comments
It seems it was my stand alone IE that I was testing with afterall, which did not work with conditional comments. I downloaded an installer from elsewhere cited in the book that enables me to install multiple stand alone versions of IE 6, and earlier, all in one installer package, and test results were different. Could you double-check my work and test it again? Also, someone mentioned that because I already added a class to the markup, it was not neccessary to fork the CSS. Was there a better way to do this? I did change the markup slightly by using a class instead of an ID (Apparently it needs to be more specific by having #breadcrumbs) #breadcrumbs .list-first { background: none; } Thanks again. - Original Message - From: Ingo Chao [EMAIL PROTECTED] To: adamq [EMAIL PROTECTED] Cc: css-d@lists.css-discuss.org Sent: Wednesday, November 05, 2008 2:40 PM Subject: Re: [css-d] List background in IE 6 and earlier and condition comments adamq wrote: ... Because IE 6 and earlier does not support the first-child element, the books recommends to apply a class to the list item to remove the background image in these browsers. Using conditional comments to apply this workaround seems best, but I cannot figure out why the background still appears in IE6 and earlier. T he rule in my conditional comments style sheet is: #breadcrumbs #list-first { background: none; } I think I also tried just #list-first, as well as a class, .list-first. The conditional comments is linked AFTER my main style sheet. URL: http://home.comcast.net/~adamq/chapter5/breadcrumb-navigation/breadcrumbs.html There is no bg image visible on the first LI in a native IE6 install, and tracing the stile shows that IE6 applies the above fix. I think the problem is how you test in IE6. Ingo -- http://www.satzansatz.de/css.html http://www.dolphinsback.com __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/