1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Body Tag and font size

Discussion in 'CSS' started by matifibrahim, Sep 24, 2006.

  1. #1
    I m using an external style sheet and I am using

    BODY {
    background: #ffffff;
    font-size:9px
    }

    to change the default font size of BODY tag but font-size is not changing while backgound color do changes! what is going wrong?
    I am using IE 6.0.2900
     
    matifibrahim, Sep 24, 2006 IP
  2. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #2
    Try adding a semicolon after 9px; and see if that helps.
     
    Smyrl, Sep 24, 2006 IP
  3. matifibrahim

    matifibrahim Peon

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    nothing happens
     
    matifibrahim, Sep 24, 2006 IP
  4. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #4
    Here is the one I am using and having no problem. Just noticed I am specifying size with pt not px.

    BODY {
     background-color:#ffffff;
     font-family:Arial,Verdana,sans-serif;
     color:#003366;
     font-size:10pt;
     text-align:justify;

    scrollbar-track-color:#eeeeee;
    scrollbar-face-color:#dddddd;
    crollbar-arrow-color:navy;
    scrollbar-highlight-color:#003366;
    scrollbar-3dlight-color:#003366;
    scrollbar-shadow-color:#003366;
    scrollbar-darkshadow-color:#003366;

    }
     
    Smyrl, Sep 24, 2006 IP
  5. matifibrahim

    matifibrahim Peon

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanx problem solved
     
    matifibrahim, Sep 24, 2006 IP
  6. penagate

    penagate Guest

    Messages:
    277
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi!

    It's body not BODY. HTML may be case-insensitive but uppercase tag names are spawn of the devil and will bite you on the arse if you move to XHTML.

    Also, you should style the html and body elements separately. html applies to the entire viewport, body does not. MSIE fudges this in quirks mode, but you shouldn't be in quirks mode if your HTML is valid.

    Regards
    - P
     
    penagate, Sep 27, 2006 IP