SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Hybrid View

  1. #1
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help With Simple CSS Problem

    OK, I am using CSS to define basic font properties of my site in an external CSS file. I have ran into 2 basic problems.

    1. I can't globally set font properties. This doesn't really matter but when I set font properties outside of a tag, they dont work. To correct this, I just put them in the body {} properties.

    2. Font sizing doesnt work in the body {} properties. It wont take 10 pt as a font size, it always shows up as standard 3 size. My code is this:

    Code:
    body {
        font-family: Arial, Helvetica, Sans-Serif;
        font-size: 10 pt;
    }
    But no matter what, the font size doesn't change. What is up?

  2. #2
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Northern California
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    remove the space

    between 10 and pt

    10pt;
    You may also want to set font properties with in a p tag as well.

    hth

    humanz
    "...Planet lurches to the right as ideologies engage/suddenly it's
    repression, moratorium on rights/what did they think the politics of
    panic would invite/the person on the street shrugs "security comes
    first"/but the trouble with normal is it always gets worse!" -- Bruce Cockburn

  3. #3
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using p instead of body is a good choice. Remember to put <p> tags around all your text though.

  4. #4
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The space doesn't effect anything, I already tried that.

  5. #5
    Bimbo With A Brain! silver trophy Saz's Avatar
    Join Date
    Mar 2001
    Location
    Kent, United Kingdom
    Posts
    5,275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Wes DeMoney
    The space doesn't effect anything, I already tried that.
    I use TopStyle to put my style sheets together. I put your code in it and it instantly gave me an error. The space between the '10' and the 'pt' should NOT be there.

    Once I removed the space, I tried viewing a few of TopStyle's templates with it. The size of any 'H' tags (H1, H2 etc) is not affected, but anything in a 'P' tag changed as I changed the 'pt' value, so once that space is removed, there's nothing wrong with the style sheet as far as I can see.
    Saz: Naturally Blonde, Naturally Dizzy!
    No longer Editor of the Community Crier.

    Don't mind me, I'm having a BLONDE moment!

  6. #6
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is TopStyle ? It sounds interesting.

    Sean

  7. #7
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    TopStyle

    http://www.bradsoft.com/

    Fantastic piece of software, one of my "Must Haves".

  8. #8
    Anyone seen my cypher? OneChance's Avatar
    Join Date
    Apr 2001
    Location
    Seattle
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You probably want to expand it, like so:
    Code:
    body, td, p, ul {
        font-family: Arial, Helvetica, Sans-Serif;
        font-size: 10pt;
    }

  9. #9
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Wes DeMoney
    The space doesn't effect anything, I already tried that.
    Don't set font styles to your <body>. It will not work.

    Set font styles to <p>, <td>, <li> etc. And to stick to the rules the space should not be there.

  10. #10
    Bimbo With A Brain! silver trophy Saz's Avatar
    Join Date
    Mar 2001
    Location
    Kent, United Kingdom
    Posts
    5,275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Duckie, you beat me to it!!!

    TheOriginalH recommended it to me and I'm really pleased he did - as I believe I told him at the time

    You can download an evaluation 'nagware' version. It's a little annoying at times, but it gives you the chance to see the full program at work before you decided whether to purchase it or not.

    As Duckie says....a 'must have'!!!!
    Saz: Naturally Blonde, Naturally Dizzy!
    No longer Editor of the Community Crier.

    Don't mind me, I'm having a BLONDE moment!

  11. #11
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by duckie
    TopStyle

    http://www.bradsoft.com/

    Fantastic piece of software, one of my "Must Haves".
    Thank you I'll check it out

    Sean

  12. #12
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I modified the code to be like the example OneChance showed and it works. Now, that is weird because I KNOW I already messed with that space and it did nothing.

    That still doesn't explain why it won't set the font outside of a tag. When I do that, it not just doesn't show but it also makes the hover and no-underline effect on the links not work. Any reasoning here? It doesn't really matter for either problem since I define a font everywhere in the site.

    (PS: I am downloading TopSite right now)

    Thanks


Bookmarks

Posting Permissions

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