Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS rule not being applied (suddenly)

    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.

    Code:
    <!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!
    Last edited by elleg; 05-05-2009 at 01:44 AM.

  • #2
    New Coder
    Join Date
    Jan 2009
    Posts
    58
    Thanks
    4
    Thanked 3 Times in 3 Posts
    ... you dont have anything in your span...


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

    i think you want...


    Code:
    <!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>

  • #3
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Close, but not quite a CSS comment:

    /* Rules for quotes * /

    Watch them spaces!

  • #5
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,854
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Quote Originally Posted by elleg View Post
    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
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •