Thread: css frustration

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    4
    Rep Power
    0

    css frustration


    hey-

    I'm trying to use style sheets on a promotional page of my band's website. I've been using stylesheets forever, so it's not that I'm unfamiliar, just thought i'm running into two problems. One is text sizing. I used the 'font-style:10pt' command to get my text formatted to that particular size, however it won't work. Here's the actual style sheet:


    body {background-color:#000000; color:#ffffff; font-family:Verdana,arial; font-size:5pt;}

    a:link {color:Blue; text-decoration:none;}

    a.hov1:hover {color:#ff6600; text-decoration:none;}

    a:visited {color:Maroon; text-decoration:none;}

    everything else except for the font-size command is working. am i doing something wrong?

    the other problem i was having is with external linking. i just couldn't get it to work at all. I tried using relative and remote paths, changing the location of the .css file, nothing was working. I was using: [link rel="stylesheet" href="http://www.fplg.net/lib/page_temp.css" type="text/css"] ..is that wrong? the external one also contains the same style info as the one posted above.

    the link to the page: www.fplg.net/barstar_promo.php
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    765
    Rep Power
    13
    Keep this in mind: <font> tags are inline style (in your HTML) so they have a very high specificity - which is a fancy way of saying they win out over stylesheet CSS every time. You can assign CSS using font as a selector:

    font {color:#ffffff; font-family:Verdana,arial; font-size:5pt;}

    You can add classes to apply style differently to <font>s:

    font.red {color:red;}
    font.blue {color:blue;}

    <font class="red" color="red">

    These will overrule anything assigned in the <font> tag itself, while non-CSS users will get the inline style. Or you could just dump the inline stuff altogether and separate content & style completely.

    The 'link' looks OK - hard to judge w/o knowing the file path. No HTML in CSS files, btw.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    4
    Rep Power
    0
    I'm familiar with the fact that anything in the <font> tags will overide a style sheet, but why is it that the text size is displayed incorrectly when i clearly have a font-size command in the body section of the style sheet?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    765
    Rep Power
    13
    Try losing the hash.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    4
    Rep Power
    0
    the hash? what in the hell is that?
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    765
    Rep Power
    13
    font {font-size:[size=huge]#[/size]10 pt;}
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    4
    Rep Power
    0
    maybe I'm on crack, but i didn't see any hashes in the style sheet next the font commands/tags?

    are you saying take ALL hashes out? ...i'm pretty sure that those are needed when using the RGB color codes?
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    765
    Rep Power
    13
    Hey -

    I cut & pasted the above rule directly out of the linked page from your original post - which I went back and checked and, it's still there. There's also a space in it - not allowed.

    Guess you're on crack.

    Let me know if you want to discuss this in a civil manner. We don't get paid all that well for hanging around here.

IMN logo majestic logo threadwatch logo seochat tools logo