![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How do I set several different properties for PRE in a CSS stylesheet, rather than resorting to this: BODY PRE STYLE="font-family:monospace; font-size:0.95em; width:40%; border:red 2px solid; color:red; background-color:#FBB; " This is red /PRE PRE STYLE="font-family:monospace; font-size:0.95em; width: 40%; border:blue 2px solid; color:blue; background-color:#BBF; " This is blue /PRE PRE STYLE="font-family:monospace; font-size:0.95em; width: 40%; border:green 2px solid; color:green; background-color:#BFB; " This is green /PRE /BODY (the above is just an example) Regards, Alan -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? |
#3
| |||
| |||
|
|
How do I set several different properties for PRE in a CSS stylesheet, rather than resorting to this: PRE STYLE="font-family:monospace; font-size:0.95em; width:40%; border:red 2px solid; color:red; background-color:#FBB; " This is red /PRE PRE STYLE="font-family:monospace; font-size:0.95em; width: 40%; border:blue 2px solid; color:blue; background-color:#BBF; " This is blue /PRE PRE STYLE="font-family:monospace; font-size:0.95em; width: 40%; border:green 2px solid; color:green; background-color:#BFB; " This is green /PRE |
#4
| |||
| |||
|
|
How do I set several different properties for PRE in a CSS stylesheet, rather than resorting to this: |
|
BODY PRE STYLE="border-color:red; color:red; background-color:#FBB; " This is red /PRE |
|
(the above is just an example) |
#5
| |||
| |||
|
|
How do I set several different properties for PRE in a CSS stylesheet, rather than resorting to this: BODY PRE STYLE="font-family:monospace; [snip] |
#6
| |||
| |||
|
|
Specifying monospace is superfluous as it's the default for <pre>, specifying 0.95em may also be pointless. pre.special{width:40%} pre.special.one{border:2px solid red;color:red;background:blue} pre.special.two{border:2px solid green;color:green;background:red} pre.special.three{border:2px solid blue;color:blue;background:green} Replace the "special, one, two, three" class names with something meaningful. pre class="special one">foobar</pre pre class="special two">foobar</pre pre class="special three">foobar</pre |
#7
| |||
| |||
|
|
pre.special{width:40%} pre.special.one{border:2px solid red;color:red;background:blue} pre.special.two{border:2px solid green;color:green;background:red} pre.special.three{border:2px solid blue;color:blue;background:green} should be: pre.special{width:40%} pre.one{border:2px solid red;color:red;background:blue} pre.two{border:2px solid green;color:green;background:red} pre.three{border:2px solid blue;color:blue;background:green} |
#8
| |||
| |||
|
|
"Alan Illeman" <illemann (AT) surfbest (DOT) net> wrote in message news:10hc4221nt376a9 (AT) news (DOT) supernews.com... How do I set several different properties for PRE in a CSS stylesheet, rather than resorting to this: BODY PRE STYLE="font-family:monospace; [snip] Thank you Arne. Thank you Spartanicus I prefer your solution Thank you Andrew Thompson It's hard to provide a webpage, when I don't have a solution! Alan |
![]() |
| Thread Tools | |
| Display Modes | |
| |