GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   CSS Gurus: Have a question on text sizing? (https://gfy.com/showthread.php?t=889490)

Horny Dude 02-22-2009 02:41 PM

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

Deej 02-22-2009 02:43 PM

no - best you can do is prevent spacing issues with overflow:auto;

Serge Litehead 02-22-2009 03:40 PM

static sizes defined by px, relative by ems

good article on topic http://www.alistapart.com/articles/howtosizetextincss/

Deej 02-22-2009 03:46 PM

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...

beta-tester 02-22-2009 03:56 PM

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.

PSSuperstars 02-22-2009 03:57 PM

Can any of you recommend a good CSS for dummies book, por favor?

Deej 02-22-2009 04:16 PM

Quote:

Originally Posted by beta-tester (Post 15535623)
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.

I swore i tested that before - apparently im mistaken... totally good to know, got a wrinkle in my brain


and PSS - just look through other sites and w3c has a lot of useful basic info...

no book, just research

devine 02-22-2009 09:11 PM

Code:

html{font-size:16px;}
and that's it :thumbsup

Young 02-22-2009 09:14 PM

Code:

* { font-size: 16px; }
Overkill for many...but that's how I'd take care of it.

Tom_PM 02-22-2009 10:01 PM

I thought you could use !important to help keep things an exact size.. even to override a browser with a modified text size.

pimplink 02-22-2009 10:08 PM

very helpful thread :)

Bored 02-22-2009 10:15 PM

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+-

Bored 02-22-2009 10:16 PM

!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