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
    wac
    wac is offline
    Regular Coder wac's Avatar
    Join Date
    Sep 2002
    Location
    Cary, North Carolina, USA
    Posts
    359
    Thanks
    2
    Thanked 0 Times in 0 Posts

    force <pre> to not change font style

    When I use <pre> the font style changes from what would normally be used. Is there a way to tell <pre> to use the same font style as the rest of the page???
    Wayne Christian

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, style it with a style sheet (tested using Mozilla).

    Code:
    <style type="text/css">
    pre { font-family: inherit; }
    </style>

    Of course IE ignores that code so for compatability you'll have to specify the same font-family as the rest of the page instead of using the simple "inherit" construct.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #3
    wac
    wac is offline
    Regular Coder wac's Avatar
    Join Date
    Sep 2002
    Location
    Cary, North Carolina, USA
    Posts
    359
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanx Roy.
    Currently, I don't specify the font family. I let the user set things via the browser preferences. But if that's the only way (cause right now I am using IE6) then I'll do that... Thanx again
    Wayne Christian


  •  

    Posting Permissions

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