Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
selector support in WIN IE
I can do the following and it seems to work nicely in FF. Use…
.classOne.classTwo{attribute:property}
…to target this…
<div class="classOne classTwo">
…but neither of these…
<div class="classOne">
or<div class="classTwo">
…but this doesn’t seem to work in Win IEs.
Anyone got any experience with this? Is this approach even valid?
Last edited by mrdale (2007-03-09 19:05:59)
Offline
Re: selector support in WIN IE
It’s valid according to the Spec granted that means nothing regarding IE.
Shoving is the answer – pusher robot
Offline
Re: selector support in WIN IE
So does anyone else use this technique?
If this can work in WIN IEs it would make styling different sections and categories uniquely (where needed) a snap… by including section and category calls in your article forms and page templates.
for example…
<div class="story <txp:section/> <txp:category>">
then you can select uniquely with
.story.default{attribute:property}
.story.contact{attribute:differentProperty}
All kindsa krazy kontrol.
Offline
Re: selector support in WIN IE
Is this something that you would use for an archive type page with various div.story from different sections and categories in it or as a template switcher of sorts?
Not sure if I’m making sense
Shoving is the answer – pusher robot
Offline
Re: selector support in WIN IE
>hakjoon
Is this something that you would use for an archive type page with various div.story from different sections and categories in it or as a template switcher of sorts?
Well, I use it so I can feed different attributes to the same div in different sections… for example…
gallery page =>
<div id="content" class="gallery">
=> full width div
standard page =><div id="content" class="default">
=> 2/3 width div, padding x, margin y
fullsize calendar page =><div id="content" class="calendar">
=> full width div, padding y
Probably better ways to do this. Just gives you more options…
Offline
Re: selector support in WIN IE
I do something similar.
I was ending up with div#section.category
although IE doesn’t like that very much either.
What I do now is place the section one element up. For example I tend to always have a #wrapper
div around content and sidebar divs so I apply the section to that those.
so I end up with
#wrapper #content {
default formatting;
}
#wrapper.section #content {
section specific
}
#wrapper.section #content.category {
section specific and category specific
}
needs extra markup though. But I tend to always have it in there anyway. Conversely you can apply the section to the body which I have done a bunch too. In fact it ends up very clean.
#content {
default
}
body.section #content {
section format
}
#content.category {
category format
}
body.section #content.category {
section + category format
}
the higher specificity of the last rule will overrid previous ones. This is what I love about CSS. There are like 100 ways to do something. And I hadn’t even considered what you wanted to do which is also awesome. I found I use body classes a lot because they always allow you to be more specific and override other previous rules.
Shoving is the answer – pusher robot
Offline
Re: selector support in WIN IE
>hak
…So you do a <body class="<txp:section/>">
Now that’s way more smart
Offline
Re: selector support in WIN IE
Hi friends,
IE6 doesn’t accept multiple classes in CSS.
Some links:
http://sonspring.com/index.php?id=102
http://dean.edwards.name/IE7/compatibility/multiple-classes-bug.html
http://www.quirksmode.org/css/multipleclasses.html
Offline
Re: selector support in WIN IE
>maniqui wrote
IE6 doesn’t accept multiple classes in CSS.
WTF was MS thinking? Is there any rationale behind all the flaws in their products? It can’t simply be shoddy work, can it.
Offline
Pages: 1