- Nov 11, 2002
- 272
- 0
- 0
So I've got a paragraph of text on my site that sits inside the <p> tags, and I want segments of the text to be different colors. I'm attempting to do this via CSS, particularly with <span> tags, but while every example I've seen assures me this should work, it does not. I've supplied my code below - can anyone help me out with this?
I am no CSS master, so I'm probably just missing something obvious here. I'm viewing this in FireFox on Mac OS X, if that helps.
CSS:
HTML:
Edit: After some more fiddling, I've found that the text in the span does indeed render gray in Safari... but why not FireFox?
Edit again: Alrighty, you can ignore this request now, I figured it out myself... had a stray <div> tag above everything, and it was fouling up things below. I knew I'd get this solved one way or another!
I am no CSS master, so I'm probably just missing something obvious here. I'm viewing this in FireFox on Mac OS X, if that helps.
CSS:
p {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
font-family: arial;
font-size: 10pt;
color: #000000;
text-align: left; }
p.standard {
margin: 0px 0px 40px 0px; }
span.lite {
color: #888888; }
HTML:
<p class=\"standard\"><span class=\"lite\">This text should be gray!</span> And this text shouldn't!</p>
Edit: After some more fiddling, I've found that the text in the span does indeed render gray in Safari... but why not FireFox?
Edit again: Alrighty, you can ignore this request now, I figured it out myself... had a stray <div> tag above everything, and it was fouling up things below. I knew I'd get this solved one way or another!
