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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Resizing inherited font sizes

    I have a website that has a header with a menu that goes across different platforms, for example a wiki and a forum.

    I want to make one external style sheet that gets called by the wiki and the forum, so I don't have to recode the header into their own css sheets. The problem is, right now I do have to code the header because the wiki and the forum set the default font size to larger than 100%, and they each use different sizes (the wiki is 127%, forum is something else). I could change the default sizes, but then I would have to redo all the fonts for the entire sheet.

    Is there a way to reset the font size for the header in an external sheet, so it doesn't inherit the size from the platform?

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    We would need to see your html to tell you more but the answer to your question is...Yes.




    No but seriously put the stylesheet after the stylesheets of the wiki and the forum so its the last stylesheet called on the page.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the response. I don't think it's an issue of stylesheet order as the header has unique identifiers.

    Here is the basic setup for the wiki:

    <div id = "wrapper">
    <div id = "header"></div>
    <div id = "content"></div>
    </div>

    "Wrapper" for some reason sets the font size to 127%, so all other font sizes on the page end up being relative to that, including in the header. This means I have to have custom css for the header repeated in the wiki css, just to change the font size. For example, if normally the font in the header is .95em, the header has to be 1.65em in the wiki to get the same result (And yet something else for the forum).
    I did try using absolute font sizes with px instead of em, that seems to work. Is there a better way to do it?


  •  

    Posting Permissions

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