4 Replies Latest reply: May 22, 2009 8:47 PM by Ron Lanham RSS

    Limit text size change for navbar?

    Ron Lanham Community Member

      I probably knew how to do this at one time using CSS, but since I used to like to allow viewers to change all the text sizes on my site I never really explored it.

       

      Anyone know of a simple way to disallow viewers to change the text size in a specific component in GLCS2 (i.e. the left navbar).

       

      If they increase the navbar's text size, or have their browser defaults set to disallow a smaller text size, the text will look squeezed or maybe even drop below the bottom of the component's navbar background.

       

      Thanks for any advice on this.

       

      BTW Nina... I finally got my site transferred to GoLiveHost and all seems fine. Thanks for telling me about them. (It was ehostsource.com mainly, but also Dotster that were causing me all of the problems.)

       

      Ron

        • 1. Re: Limit text size change for navbar?
          johndonaldson Community Member

          Anyone know of a simple way to disallow viewers to change the text size in a specific component in GLCS2 (i.e. the left navbar).

           

          You cannot completely "disallow" text size changes for your users. If you have created CSS rules which control the presentation of the elements of your "component", then you can add the !important declaration to the CSS rules for that element: e.g.:

           

          #leftnav li { font-size: 12px !important; }

           

          It lets the browser know you consider the declaration important, it does not however give your styles dictatorial rights;-) A user can do the same thing, and their styles will win over yours. Neither CSS nor modern browsers (running on PCs, PDAs or mobile phones) give the page author absolute control over presentation 8-)

           

          John

          • 2. Re: Limit text size change for navbar?
            Ron Lanham Community Member

            Thanks John.

             

            So when you say "... a user can do the same thing..." I am assuming that you mean the browser's increase/decrease text size button (or menu for Firefox) will rule out.

             

            So what would be the case(s) where the 'important' attribute would actually make a difference?

            • 3. Re: Limit text size change for navbar?
              Ron Lanham Community Member

              John... no need to reply to my last question.

               

              I went to the w3.org site and see that it is a complex issue.

               

              I'm currently reading on it.

               

              Thanks for making me aware of this. Really appreciate it.

               

              Regards,

               

              Ron

              • 4. Re: Limit text size change for navbar?
                Ron Lanham Community Member

                Just to follow up...

                 

                I have now included "!important" in the font rule, but both Safari's text increase button and Firefox's menu View > Zoom easily over rides it.

                 

                Oh well...