Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Anything Goes
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:11

Locking the size of the text in a html page to exact px size

Poster: 4viggo
Dated: Monday September 22 2003 - 13:44:45 BST

Is it possible to lock the size of text in a browser window so the user can't change it using the text size option of the browser :?: The same way you can lock the size of the text in the menu using px :roll:

Poster: Hergio
Dated: Monday September 22 2003 - 14:31:29 BST

Yup, using CSS (cascading style sheets). If you dont know what they are or how to use them, google the term and you will get alot of tutorials and examples. Then once you know how to use them, in the head of your document, you could do something like.
<STYLE type="text/css">
  font-size: 12px;

  font-size:  10px;

This would force all the text in your page to be 12px, no matter what....unless you override it somewhere. Thats why its called cascading style sheets, because things take a style from parent objects but styles closer to the object get presidence. The above example shows would make sure everything is 12px big in the body (everything on the page), but the table tag overrides it so the text in your tables would be slightly smaller. This allows you to lock in different sizes for different situations.

Poster: Andy
Dated: Monday September 22 2003 - 15:59:30 BST

Also, you can specify pixel values for fonts in the menu style.

We use fontsize="75%" so that the menu will change but you can use fontsize="12px" if you like.


Poster: 4viggo
Dated: Monday September 22 2003 - 18:52:29 BST

Thanks a lot, i will have to dig into style cheets then. I've been trying to avoid them as long as i could, but now i'm googling away :lol:

Poster: Hergio
Dated: Monday September 22 2003 - 20:17:03 BST

Believe me, you dont want to avoid them. They are one of the most powerful ways to style and customize your site, as well as the most dynamic and flexible. You will be very glad you know how to use them when you do.