Archive for March 2009
Mar/09
13
CSS :content and :section pseudo element selectors
5 Comments · Posted by Dave Smith in CSS
I believe there is a useful and yet missing CSS3 selector. I’ll explain with a rough example:
<section>
<h1 or h>My section heading</h1 or h>
<p>Para</p>
<p>Para</p>
<p>Para</p>
<p>Para</p>
</section>
Given the above, to style the section content so that it is indented by 20px, but leave the heading with no margin, could be done with:
.section > *:not(h1) {margin-left:20px;}
but what if the following [...]
A bit of fun with a jQuery and background image sprite.
Current version 1.0.4 alpha.
No tags
