...

View Full Version : Resolved CSS rule not being applied (suddenly)



elleg
05-04-2009, 11:10 PM
I'm having issues with a class rule in my css not applying. It was working fine, then, all of a sudden, it didn't work anymore. I've pulled out the offending code to try by itself, and it still won't work.



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<style type="text/css">


/* Rules for quotes * /

.quote-mark {
font-size: 250%;
color: #993333;
}

</style>
</head>
<body>

<div class="content">
<p>
content content content content content content content content content
content content content content content content content content content
content content content content
</p>
<blockquote><span class="quote-mark"></span>content content content
content content content content content content content content content
content content content content content content content content content
content content content
</blockquote>
<p>
content content content content content content content content
content content content content content content content content content
content content content content content content content content content
content content content content content content content content content
content content content content content content content content content
</p>
</div>

</body>

</html>


(The rule is supposed to make the text in the span big and brick red).

Any help is appreciated!

CalumK
05-04-2009, 11:14 PM
... you dont have anything in your span...



<span class="quote-mark"></span>
see...

i think you want...



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<style type="text/css">


/* Rules for quotes * /

.quote-mark {
font-size: 250%;
color: #993333;
}

</style>
</head>
<body>

<div class="content">
<p>
content content content content content content content content content
content content content content content content content content content
content content content content
</p>
<blockquote><span class="quote-mark">content content content
content content content content content content content content content
content content content content content content content content content
content content content
</span>
</blockquote>
<p>
content content content content content content content content
content content content content content content content content content
content content content content content content content content content
content content content content content content content content content
content content content content content content content content content
</p>
</div>

</body>

</html>

elleg
05-04-2009, 11:17 PM
Actually, there is something in my span -- it didn't show up in my post exactly the way I typed it in my code. In my code it's & # 8220 ; (without all the spaces, but I had to type it like that so it would actually display). If you look at my post, you'll see that was parsed as the character it represents, which is a left double quote.

adios
05-04-2009, 11:35 PM
Close, but not quite a CSS comment:

/* Rules for quotes * /

Watch them spaces!

elleg
05-05-2009, 02:40 AM
Thanks so much =) I knew it was something stupid, since it WAS working. For the life of me, I couldn't find the problem. I'm glad I left the comment for that section of the CSS in there, or I might still not know my problem.

abduraooft
05-05-2009, 11:12 AM
Thanks so much =) I knew it was something stupid, since it WAS working. For the life of me, I couldn't find the problem. I'm glad I left the comment for that section of the CSS in there, or I might still not know my problem.Whenever you get something unexpected from your CSS, always use http://jigsaw.w3.org/css-validator/#validate_by_input



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum