CSS attribute selectors

Hey! It aint that hard!
Post Reply
Gerry
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
Posts: 5727
Joined: 12/04/01, 12:00 am
Location: Perth, Western Australia
Contact:

CSS attribute selectors

Post by Gerry » 09/05/08, 12:21 am

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


Man they go and add some thing like this:

Code: Select all

p[title*="world"]
which will match a p tag with a "title" attribute that contains the word "world"

ie. It will match this:

Code: Select all

< p title="hello world!>
but then they stop there!!!

Why couldn't they just go one step more and make something that will be of benefit! Forget equality, I want comparison. I wanna be able to do this:

Code: Select all

img[width>100%]{
  width: 100%;
}
or if that's too tricky, even just:

Code: Select all

img[width>1280]{
  width: 100%;
}
would be fine by me.

Now that would be useful... why stop at equality, is all I'm saying. The number of ways this could be used is endless, compared to the equality crap that they have added.

RedRage
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
Posts: 1542
Joined: 12/04/01, 12:00 am

Post by RedRage » 09/05/08, 1:16 pm

lol i feel your pain

Post Reply