42 users online (1 members and 41 guests)  


  Results 1 to 5 of 5

Related

  1. Font size with in Text box    Forum: HTML Forum
    Replies: 1
  2. Font Size/Font Face    Forum: HTML Forum
    Replies: 2
  3. font size    Forum: HTML Forum
    Replies: 2
  4. font size in a table    Forum: HTML Forum
    Replies: 1
  1. #1
    joanbeckwith's Avatar
    New User

    Status
    Offline
    Join Date
    May 2004
    Posts
    2

    Font Size/Font Face

    No matter how I code, my browser will display only one font face and size. Is there an over-ride that has to be turned off in the browser? A short example:
    <html>
    <body>
    <h1 style="font-size:150%;color:blue">My Heading</h1>
    <p style="font-size:80%;color:red">A paragraph. A paragraph. A paragraph. A paragraph. </p>
    </body>
    </html>
    The browser displays h1 in blue, but the font size is standard for h1 and the same for the paragraph - color okay -- size not. What can I change?

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    Hi there joanbeckwith

    And a big welcome to these forums
    It is not normal practise to alter the font-size of headings...
    it is assumed that one of the six will suit the purpose.
    Nevertheless you can change the font-size if you feel that you must.

    example

    compare...

    <h1 style="font-size:80px;">My Heading</h1>


    to...

    <h1>My Heading</h1>

    When using percentages with headings you may run into some peculiar effects though.

    As regards the <p> tag I think that you will find that...

    <p style="font-size:80%;color:red">A paragraph. A paragraph. A paragraph. A paragraph. </p>


    is 80% of the size of...

    <p>A paragraph. A paragraph. A paragraph. A paragraph. </p>


    coothead

  3. #3
    joanbeckwith's Avatar
    New User

    Status
    Offline
    Join Date
    May 2004
    Posts
    2
    I don't think I worded my question properly. I agree with you about headings - that was an example picked out of a tutorial.
    Just so we know we are talking about code that should work, here is an example from the w3schools.com "try it" editor:

    h3 {font-family: times}
    p {font-family: courier}
    p.sansserif {font-family: sans-serif}

    url:
    http://www.w3schools.com/css/tryit.asp?filename=trycss_font-family

    No matter what name is typed in place of "times" or "courier" above, the example and all other pages display in arial - always. I was under the impression that a browser default font would display only when there was no font in the web page code.

    The same for font-size, font-family etc. Hope I was a little more clear this time.

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    One important thing you didn't tell us..which browser are you using?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    Hi there joanbeckwith,

    as QuietDean said...
    'One important thing you didn't tell us..which browser you are using?'
    I have just been over to 'w3schools' and the 'try it'
    worked perfectly for me in...
    1. firfox 0.8
    2. Opera 7.1
    3. I.E. 6.0
    4. Mozilla 1.6
    5. Netscape 7.1


    coothead



Tags for this Thread