Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-07 10:30:29

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

IE7 adjacent selector bug

Just a heads up for anyone using adjacent selectors in IE7: Don’t use HTML comments between your adjacent elements! It seems IE7 treats comments as elements, so your targeted element isn’t styled.

Example:

<div id="foo"><p>Not me</p></div><!--//foo-->

<p>Yes, me!</p>

CSS:

#foo + p {
	background: red;
}

At least it’s easy enough to remove the comment :).

Offline

Board footer

Powered by FluxBB