|
-
Sep 24th, 2003, 10:06 AM
#1
Thread Starter
Hyperactive Member
CSS: merging classes
Hi, I think the question is simple:
Code:
<style>
p.R = {color: red}
p.U = {font-deco: underline}
</style>
...
<p class=R class=U> red & underline text wanted </p>
IE takes only the first class. How to specify, or how to write style, which will be the summary of all particular styles?
-
Sep 24th, 2003, 01:38 PM
#2
Lively Member
add it to you stylesheet..
<style>
p.R = {color: red}
p.U = {font-deco: underline}
p.RU = {font-deco: underline; color: red}
</style>
it's the correct way to do it..
http://www.raketje.com coming..............soon................
-
Sep 24th, 2003, 02:00 PM
#3
Thread Starter
Hyperactive Member
Yes, that's what I've had. When R and U are the case, it works fine. But this begins to be quite ineffective since the combinations of all used 'letters'.
I used this sample to illustrate the problem, in fact I have about six such 'letters', which together gives 6!=720 possibilites.
I don't find usefull to write all these cases, of course; I'm sorry, but is there any other solution...?
-
Sep 24th, 2003, 02:56 PM
#4
Lively Member
http://www.raketje.com coming..............soon................
-
Sep 24th, 2003, 03:37 PM
#5
Lively Member
I guess you have to build the necessery stylesheet when you load the page.
you can do this using javascript, php, asp
needed stylesheet =
<style>
p.needed = {color: red; font-deco: underline}
let a script add the stuff you need.
http://www.raketje.com coming..............soon................
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|