SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Sep 2004
    Location
    PA
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question How Do You Stop Text Resizing Via CSS In FireFox.

    It's critical that the size of text in my navigation table does not change. Yep! that's right, I don't want the user to modify the text size in the nav bar.

    This can easily be achieved in IE but my problem is the CSS will not stop the user from resizing text in FireFox.

    My lame work around is to mimic the CSS text with transparent GIF images. Even thought the GIF's are under 300 bytes the server calls still take to much time.

    I really want to stop text resizing with CSS in FireFox!

    Can it be done? If so, how?

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Can it be done? If so, how?
    Theres no way that I know of doing this with css as text sizing in firefox is a browser control of which you should have no influence.

    Some people will want big text whatever the outcome. You should really work on having yor navigation work well when the text is resized rather than trying to limit it to what you want.

    However , I realise that things aren't that simple and some designs need to be fixed to match the design and other than using images for text your options are very limited.

    Paul

  3. #3
    SitePoint Evangelist Mr. Brownstone's Avatar
    Join Date
    May 2002
    Location
    Relative
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thankfully, it can’t be done as far as I know. The same goes for Opera. Indeed, the fact that IE does retain px font-sizes regardless of user-preference is considered by many to be a bug.

    Consider using em measurements instead of px to allow for a resizable “nav-bar.” It is quite possible to come up with a solution that will not look ugly when it is resized. Besides, it’s not like the majority of your audience are going to change to something beyond the default text-size anyway, and those who do increase text-size do so because their disability imposes it upon them.
    Of course, that's just my opinion. I could be wrong.

  4. #4
    SitePoint Member
    Join Date
    Sep 2004
    Location
    PA
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rats! Rats!

    Quote Originally Posted by Mr. Brownstone
    Thankfully, it can’t be done as far as I know. The same goes for Opera. Indeed, the fact that IE does retain px font-sizes regardless of user-preference is considered by many to be a bug.

    Consider using em measurements instead of px to allow for a resizable “nav-bar.” It is quite possible to come up with a solution that will not look ugly when it is resized. Besides, it’s not like the majority of your audience are going to change to something beyond the default text-size anyway, and those who do increase text-size do so because their disability imposes it upon them.

    Hmm Hmmm....

    I'll experiment with em and se how it works out....

    I guess using px font sizes is a no no....

    Thanks alot!

  5. #5
    SitePoint Member
    Join Date
    Sep 2004
    Location
    PA
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh man did I ever find a perfect example as to why I hate text resizing

    check out this link
    http://www.pixelgraphix.de/archives/...evelopment.php

    now hold down the Ctrl key and roll your mouse wheel a few times......

  6. #6
    SitePoint Member
    Join Date
    Sep 2004
    Location
    PA
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    WOW, I'm finding tons and tons of sites that look good in IE but when viewed in FireFox with larger text just fall apart tragically...

    I blame this solely on IE and the way it uses CSS!

    I'm willing to bet that when most developers hit their F12 Key on Dreamweaver it shows the page in IE first.

    I'm going to change that setting right away. I think its a better idea to test against FireFox first.

    Just when you thought IE won the browser war security issues surfaced and BOOM! Everyone ran to FireFox.

    "Sigh"

  7. #7
    Object Not Found junjun's Avatar
    Join Date
    Mar 2002
    Location
    northern MI
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not bulletproof at all, but this is as close you'll get using text afaik:
    HTML Code:
    <div id="nav">
    <a href="file.html">Link</a>
    </div>
    Code:
     div#nav a {font-size: 12px !important;}

  8. #8
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by junjun
    It's not bulletproof at all, but this is as close you'll get using text afaik:
    HTML Code:
    <div id="nav">
    <a href="file.html">Link</a>
    </div>
    Code:
     div#nav a {font-size: 12px !important;}
    That still won't stop opera, which just magnifies the entire page.

  9. #9
    SitePoint Evangelist Mr. Brownstone's Avatar
    Join Date
    May 2002
    Location
    Relative
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by surge42
    I blame this solely on IE and the way it uses CSS!
    The issue is more to do with ignorance in design. I don’t mean that in a derogatory way, because time was when folk would use FONT and TABLE tags without a second thought.

    But take a look at these sites: http://www.simplebits.com/ http://www.stopdesign.com/ http://sidesh0w.com/ http://diveintomark.org/ http://a.wholelottanothing.org/

    They all resize just fine in Firefox, but they are all built using modern design techniques. Well, I say “modern”; the CSS2 specification is 6 years old.
    Of course, that's just my opinion. I could be wrong.


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
  •