SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Redefine <Body> with CSS: font size problem

    Hello,

    Desperately seeking help on this weird problem. I have redefined my <body> tag to format all text. The colour and fontface change but no matter what I do the SIZE of the font will NOT change. It just stays on 14px (3 HTML size) despite having specified a size.

    Has anyone else had this problem??? Please tell me I'm not the only one!!

    Note: I've redefined my body tag like this:

    body { font-family: Arial, Helvetica, sans-serif; color: #996600; font-weight: normal; font-size: 10px}

    Solutions will be muchly appreciated :-)

    Vanessa

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you happen to have a link to the page in question?

  3. #3
    SitePoint Enthusiast welded's Avatar
    Join Date
    Jun 2001
    Location
    vancouver.bc.ca
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you wouldn't happen to have your text in a table, would you? if so, try this:

    Code:
    body, td { font-family: Arial, Helvetica, sans-serif; color: #996600; font-weight: normal; font-size: 10px;}
    also note the semi-colon after the size definition.
    it's amazing what velocity can do
    when human beings are in season

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Welded would be correct. Unless the text in question is not directly contained inside the BODY tag, then your style declaration will not affect it. This is how I set up my CSS:

    body { margin: 0px; }

    body, p, div, td { font-family: verdana; font-size: 9pt; color: #000000; }
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello all,

    This is the solution that seemed to work for me:

    Yes, my whole page is in a big table with many other tables in it, so instead of redefining the body tag, I have redefined the td tag to read this:

    td { font-family: Arial, Helvetica, sans-serif; color: #996600; font-weight: normal; font-size: 10px;}

    The weird thing is that when redefining the body tag it picked up other text formatting; colour etc but not the size. However redefining the td seems to do both. Good enough for me!

    Thanks everyone,

    Vanessa

  6. #6
    SitePoint Enthusiast welded's Avatar
    Join Date
    Jun 2001
    Location
    vancouver.bc.ca
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no problem.
    i learned this by having the selfsame problem. i must have torn handfulls of my hair out in the process. "it should work, why doesn't it?!?!"
    it's amazing what velocity can do
    when human beings are in season

  7. #7
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not htat it matters but if you want the text to be "normal" anyway, you can take out the "font-weight: normal" definition.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


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
  •