SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Australia
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Css stylesheet issue...

    I use an external stylesheet, and th font for everything is tahoma size 10. This works fine for general text, hyperlinks and input boxes, however when I have text in a table, it turns out size 12! Even if I manually select that text and set it to 10, whenever I view the site it is size 12!!

  2. #2
    SitePoint Guru Wullie's Avatar
    Join Date
    Oct 2002
    Location
    Greenock, Scotland
    Posts
    701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    at the top of your stylesheet inset this

    Code:
     td { 
       font: 10px tahoma, arial, verdana, sans-serif;
       }
    That will apply the font to every table cell. Tables do not allow styles to cascade into them that is why the style is breaking when you create a table.
    ASP.NET Freelance Web Developer
    Bored? Check out my photography folio at Flickr

  3. #3
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Wullie
    That will apply the font to every table cell. Tables do not allow styles to cascade into them that is why the style is breaking when you create a table.
    Amazing. I never knew that... Guess it shows just how many tables I use.

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Australia
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh wow thank you so much!!!

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,374
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by Wullie
    Tables do not allow styles to cascade into them that is why the style is breaking when you create a table.
    Not quite true as IE6 in standards mode is fine as are other browers in standards mode. Its ie6 in quirks mode and ie5/5.5. that are the main culprits although opera without a doctype emulates ie's behavior (and the broken box model).

    Have a look here for some more:

    http://archivist.incutio.com/viewlist/css-discuss/4928

    Paul


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
  •