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 5 of 5
  1. #1
    New Coder
    Join Date
    Sep 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    my font wont change

    Hi,

    I am trying to change the font for my main bodily text and my heading but it will no change. Here is the code

    Code:
    #head {
    font-style: "Trebuchet MS";
    position: absolute;
    top: 30;
    left: 130;
    }
    
    #bodytext {
    top: 200;
    font-size: 18;
    font-style: "Cooper Black";
    }
    and

    Code:
    <div id="head">
    <h2>Welcome to the Lib Dems Supporter Society</h2>
    </div>
    
    <div id="bodytext">
    <p>This is is home of all supporters of the Lib Dems. It holds details of their policys,<br />
     information about up and coming events, YouGov survey results and graphs, and<br />
     details about the main members of the party. It is the ultimate information database<br />
     about the Liberal Democrats.</p>
    <hr />
    <p>Here are some useful links:</p>
    </div>
    I wonder if you could help!

  • #2
    Senior Coder
    Join Date
    Apr 2007
    Location
    Quakertown PA USA
    Posts
    1,028
    Thanks
    1
    Thanked 125 Times in 123 Posts
    Instead of font-style: you want font-family:

    If the user does not have the font you specify installed on their system, the text will not be displayed in that font.

  • #3
    New Coder
    Join Date
    Sep 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by PappaJohn View Post
    Instead of font-style: you want font-family:

    If the user does not have the font you specify installed on their system, the text will not be displayed in that font.
    Thanks So Much.

  • #4
    Regular Coder BWiz's Avatar
    Join Date
    Mar 2006
    Location
    Sol System
    Posts
    471
    Thanks
    7
    Thanked 21 Times in 21 Posts
    FYI, you weren't using a unit of measurement for the font-size attribute. You need one (either px, em or %) for it to work.
    BWiz :: Happy Coding!
    2006
    2007 2008 2009
    2010 2011
    Irrational numbers make no sense.

  • #5
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Peronally i would use:

    Code:
    p, a, span, h1, h2, body {
    font-family: "Trebuchet MS";
    }
    
    .headtext {
    font-weight: bold;
    }
    so you have a constant in all your text, when use CSS classes for the size and/or colour etc.


  •  

    Posting Permissions

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