Dev.Opera - Follow the standards, break the rulesDev.Opera - Follow the standards, break the rules

Login

Lost password?

Forums » Article Discussions

Discuss the articles posted on Dev.Opera.

Note: You need to login to post in the forums. if you don't have an account you first need to sign up.

By teleject anchor Thursday, 21. August 2008, 11:14:54

CSS 3 attribute selectors

In this article, Christopher Schmitt carries on his detailed exploration of what CSS3 has to offer us, looking at CSS3 attribute selectors that allow us to write selectors matching strings of text inside attribute values.

( Read the article )

By SteveD O anchor Thursday, 21. August 2008, 18:14:47

avatarLove this article. As someone familiar with CSS2 and starting to look into CSS3, this was a nice little primer.

Would love to see an article on utilizing CSS3's support for multiple background images. That's gonna help me hugely. No more unnecssarily nested divs.

Any news on when IE will be supporting CSS3? Cuz until they do, I'm not gonna bother using it, unless it's just to make things prettier.

By teleject anchor Thursday, 21. August 2008, 21:27:56

avatar@SteveD: I'm glad you liked the article.

I think an article on multiple background images would be great, too.

You check out IE's support for CSS3 at this link http://www.css3.info/css3-features-in-ie8/

By Tyssen anchor Friday, 22. August 2008, 00:35:27

avatarCurrently only Safari supports multiple bacgkrounds, so we're even further away from being able to use that than we are from being able to use attribute selectors.

By floyd1616 anchor Saturday, 23. August 2008, 18:07:17

avatarVery very interesting article, Christopher!
I have translated it... in italian :smile:

The URL is: http://www.extrowebsite.com/articolocss.asp?id=80

Good Luck!

Giuseppe

By scipio anchor Wednesday, 27. August 2008, 16:14:23

avatarWhat I actually miss sometimes is a selector that matches elements not having a certain attribute, say something like:

a[!href] { ... }

or one that means "where attribute x is NOT y", say:

a[href!="example.com"] { ... }

By brucelawson anchor Monday, 1. September 2008, 16:32:17

avatarThere is a negation selector:

http://www.w3.org/TR/css3-selectors/#negation

So you can write a rule a:not([href="http://www.example.com"]) that selects all anchors except those that link to example.com

You'll be shocked to learn that it doesn't work in current versions of IE, though.

bruce

By trygvelie anchor Thursday, 15. January 2009, 22:32:56

avatarCombining attribute selectors with other selectors can create some really interesting solutions.

As an example; by combining the attribute selector and the general sibling combinator it's possible to make a fully functional tabbed menu.

Moderators: pepelsbey | dstorey | mcx | operadev | chrismills | shwetankdixit | brucelawson | iheni | andreasbovens | zibin | mollydotcom