Good day to all.
I have read a css book in which i have read an example that we can access elements styles via their attributes, for instance: if i have to style all the input elements whose whose type attribute is text (
border:1px solid #ff0000;
The above style should apply to all the input element whose type attribute is text. But they are not working as read. So i want to know that am i missing something ... how could i achieve this ? the reason i want to learn this method is because it will make the css file a smaller and more control on all the elements without bothering to add class attributes.
So anyone here could share their thoughts regarding this. :thumbsup:
And in which browser/s is
And in which browser/s is this not working?
Did your book explain in footnote or otherwise the biggest problem with using attribute selectors, namely that IE6 suports none of them, and IE7 provided support for a couple iirc, so sadly given total lack of support in IE6 they are next to useless unless used as a means to hide/filter rules from IE, which isn't really their purpose.
It's a shame as they promissed a degreee of control that would have been a joy but IE essentially rendered them all but useless to us!
Yes IE6 seems to be
Yes IE6 seems to be unaffected with those methods. Firefox does support this method, but it is useless to use this way.
So final conclusion is that we should not use it or their is any other way which we can workout with IE6 too.
I think that many of us were
I think that many of us were excited when we first came across them, I know I was as the possibilities for styling using them took CSS forward by leaps and bounds but then when you find that the majority browser in use had zero support for them, there seemed little point in making any meaningful use of them, I've never used them except for fun or where I simply cared not that they wouldn't work in IE but that that didn't detract from things e.g setting a bullet graphic to http links to denote external links.
Use them but remember that as they won't work for IE they have to be used in some fashion that doesn't break the site styling without them.
Yes i was also excited with
Yes i was also excited with that , well thanks for the useful advice