[RESOLVED] Broken CSS
Results 1 to 11 of 11

Thread: [RESOLVED] Broken CSS

  1. #1
    Senior Member
    Join Date
    Sep 2012
    Posts
    269

    resolved [RESOLVED] Broken CSS

    would somebody please tell me what I'm doing wrong. It's probably something simple, but I need a few pairs of eyes.

    Here's the style:

    Code:
    CountPart {
    	background:#000;
    	width:40px;
    	height:24px;
    	margin:auto;
    	font-family:Lucida Sans Unicode, Lucida Grande, sans-serif;
    	font-size:18px;
    	font-weight:900;
    	text-align:center;
    	font-stretch:expanded;
    	color:#FFF;
    }
    Here's the call:
    Code:
    <div class="CountPart">
    
    <?php
    echo $_SESSION['CounterField'];
    ?>
    </div>
    The combination just doesn't work. I end up with 12px text, Times, and black on a white foreground. I have tried putting the <div> statement inside the php code, but that doen't work either. I have run the style through Fiddle and it doesn't work there.

    So long, and thanks for all the fish

  2. #2
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,906
    You're missing the . at the beginning of the CSS class selector.
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  3. #3
    Senior Member
    Join Date
    Sep 2012
    Posts
    269
    Well, with the '.' it fiddles, but nothing live.

  4. #4
    Senior Member traq's Avatar
    Join Date
    Jun 2011
    Location
    so.Cal
    Posts
    949
    clear your browser cache.

  5. #5
    Senior Member
    Join Date
    Sep 2012
    Posts
    269
    That was the first thing I did, and that didn't help. So, I reset Safari, and still nothing. I loaded the page into Firefox, which has no cached page, and it didn't work there, either.

  6. #6
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,906
    Have you uploaded the correct file? Have you checked? Did Firefox download the right file? Have you checked? What rules does Firefox say it's applying? (Can Safari also say?)
    Last edited by Weedpacket; 11-03-2012 at 04:41 AM.
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  7. #7
    Senior Member traq's Avatar
    Join Date
    Jun 2011
    Location
    so.Cal
    Posts
    949
    What does your HTML look like after the PHP is done? Could you give a link to your fiddle?

  8. #8
    Senior Member
    Join Date
    Sep 2012
    Posts
    269

    Wink

    I'm hosting this site on my computer. There are no uploads. I did not know that Firefox would track rules used. I am unaware that Safari does the same.

    After much head-banging I got the blessed thing to work. I called the <div> to a css style that I knew worked. I then copied that style and renamed the reference. That worked. So I set the style like I wanted and that worked. Not bad for a dumb Aggy.

    Here's the fiddle that worked: http://jsfiddle.net/Pjv8S/16/
    Last edited by timstring; 11-03-2012 at 11:24 AM.

  9. #9
    Senior Member traq's Avatar
    Join Date
    Jun 2011
    Location
    so.Cal
    Posts
    949
    Quote Originally Posted by timstring View Post
    There are no uploads.
    I did not know that Firefox would track rules used.
    I am unaware that Safari does the same.
    I called the <div> to a css style that I knew worked.
    I then copied that style and renamed the reference. That worked.
    So I set the style like I wanted and that worked.
    I'm ...not sure I understand what you mean by any of that.

    But it sounds like you got it working the way you wanted? If so, I'm glad.

  10. #10
    Senior Member
    Join Date
    Sep 2012
    Posts
    269
    Yes, all works now, but I spent two agonizing hours trying to draw a black box with green numbers

  11. #11
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,906
    Quote Originally Posted by timstring
    I did not know that Firefox would track rules used.
    Right click the offending element and select "Inspect Element". See also the other stuff listed under "Web Developer" in the tools menu.

    Also, Firebug is a valuable extension for any client-side work.

    As for Safari, you use it more than I do so you'd have a better idea of what it does or doesn't have.
    Last edited by Weedpacket; 11-03-2012 at 10:55 PM.
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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