Where's the website?

Our advanced systems detected you're trying to access porcupine colors by an old and deprecated browser like Internet Explorer 7 or even 6!
This website uses some technologies which can't be detected from such an outdated software.

We urge you to try again by using one of the following browsers: Google Chrome, Apple Safari, Opera ή Mozilla Firefox.

porcupine colors

category_img

Extending the use of adjacent sibling combinator in CSS3

The adjacent sibling combinator helps us combine two selectors.

An example:

h1+p{ 
	color: red
}

In this example when a paragraph comes right after an h1 it is red.

By extending the example above we can declare this:

h1+h2+p{ 
	color: red
}

Now the paragraph turns to red only when it follows an h2 which comes right after an h1.

The technique works in Safari, Chrome, Opera and Firefox and its validity has been confirmed by Eric Meyer. Adjacent sibling combinators work for Internet Explorer 7+ too, but I have not tested my discovery there yet.

If you know any relevant reference or want to comment this, please share it on Twitter.

Share this post or make it forever yours:

# Journal Feeds
Commenting is not available in this channel entry.