![]() |
CSS Gurus: Have a question on text sizing?
Is there a way with CSS to keep my website font size the same? This way if someone comes to my site with their default font size set at 27, it will look the same as someone with their font size 16. I have tried using 'em' instead of 'px', but no luck. Any help would be great.
:thumbsup |
no - best you can do is prevent spacing issues with overflow:auto;
|
static sizes defined by px, relative by ems
good article on topic http://www.alistapart.com/articles/howtosizetextincss/ |
hrmmm... if you define it by actual pixels it wont change when a surfer ups their text size?
I thought i tried that once... ill have to experiment again... |
Just set the font-size in px instead of em and it'll be fixed to the size, no matter what's the default text size in surfer's browser.
|
Can any of you recommend a good CSS for dummies book, por favor?
|
Quote:
and PSS - just look through other sites and w3c has a lot of useful basic info... no book, just research |
Code:
html{font-size:16px;} |
Code:
* { font-size: 16px; } |
I thought you could use !important to help keep things an exact size.. even to override a browser with a modified text size.
|
very helpful thread :)
|
Be aware, that some browsers don't ZOOM like they are supposed to. Its been a while, but I think it might be IE6 that uses its own zooming technique, different from the standard ctrl+-
|
!important makes the CSS rule overrule any other CSS rule
div { color: red!important } div { color: blue; } in this case, it would take the red, keep in mind how specificity and the cascade works too |
All times are GMT -7. The time now is 12:35 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc