Arch Stanton
04-28-2004, 12:15 PM
I just learned a cool trick today.
With css you can select an element based on it's attributes. For example, lets say you want all images that are aligned right to have padding only on the left.
img[align="right"] {
padding-left:5px;
}
you can also negate the selection with a |
input[type|="password"] {
font-family:serif;
}
you can also select based on whether or not an attribute is even present.
p[align] {
padding:10px;
}
Unfortunately none of this works in IE yet.
dubtastic
04-28-2004, 12:18 PM
Unfortunately none of this works in IE yet.
what browsers is this trick compatible with?
Arch Stanton
04-28-2004, 02:48 PM
I don't know, I learned the trick today, haven't tried it yet.
:)
I think it works in opera, mozilla, etc.
Jeff O.
04-29-2004, 09:42 PM
Very cool man. Thanks for the tip. I just read something about this not too long ago at Zeldman's site. As far as the browser question, not to get off on a rant, but wouldn't it be nice if IE just went away and Mozilla, Firefox, and Safari were the ONLY browsers left! YAYYYYY!! (oh... kill that fucking buzz man... I forgot, Bill Gates is worth 30 billion dollars... :( ) Anyway, thanks for the excellent tip. :)
Nemesis
04-29-2004, 09:54 PM
I've been using Mozilla for a long time and the only thing keeping from using it as a
primary browser is that it won't display scrollbar colors :(
What can I say, I'm a sucker for bling.
mojojojo
05-03-2004, 06:52 AM
Oh wow. That's nice info Joel.
What is up with IE these days. It won't accept many types of codes.
Jeff O.
05-03-2004, 08:15 AM
The problem with IE 6+ is that it is so forgiving. It is mostly CSS1 compliant (and some CSS2), and it's actually a pretty nice browser, except for the fact that it lets you get away with poorly formed and non standards-compliant scripting. The proprietary features are a pain in the ass too, especially when you're trying to develop standards-compliant sites, without a lot of browser-sniffing. If you develop XHTML/CSS/Javascript all day, you soon fall in love with the Gecko rendering engine. Still not perfect, but as close as we currently have.
freakyclean
05-03-2004, 09:59 AM
The problem with IE 6+ is that it is so forgiving. It is mostly CSS1 compliant (and some CSS2), and it's actually a pretty nice browser, except for the fact that it lets you get away with poorly formed and non standards-compliant scripting. The proprietary features are a pain in the ass too, especially when you're trying to develop standards-compliant sites, without a lot of browser-sniffing. If you develop XHTML/CSS/Javascript all day, you soon fall in love with the Gecko rendering engine. Still not perfect, but as close as we currently have.
I totally agree. :grin2:
Koobi
05-19-2004, 03:14 PM
The problem with IE 6+ is that it is so forgiving. It is mostly CSS1 compliant (and some CSS2), and it's actually a pretty nice browser, except for the fact that it lets you get away with poorly formed and non standards-compliant scripting. The proprietary features are a pain in the ass too, especially when you're trying to develop standards-compliant sites, without a lot of browser-sniffing. If you develop XHTML/CSS/Javascript all day, you soon fall in love with the Gecko rendering engine. Still not perfect, but as close as we currently have.
IE seems like a nice browser to those who don't develop I guess. But IE has just so many bugs...from caching to all those memory overflows and add the CSS bugs to it heh.
Nice thread anyway, good little trick that was. I use selectors sometimes as a IE CSS hack. :)