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 - Why double list font size? (https://gfy.com/showthread.php?t=1010342)

DWB 02-14-2011 03:32 PM

CSS gurus - Why double list font size?
 
I'm working with a Wordpress theme and the CSS is listing font size as two sizes, like this...

Code:

.nav-entries a, .post-entries a { font: 14px/16px Arial, Helvetica, sans-serif; color:#6ca0a8; font-weight: bold; text-decoration:none;}
Never come across this before. Can someone explain to me the reason?

Thanks

harvey 02-14-2011 03:58 PM

it's a bad behavior, but it's used to determine the line-height

glowlite 02-14-2011 04:53 PM

As harvey said it has to do with the line-height property when using font: shorthand.
Very bad behavior, unpredictable results.

font: 14px/16px is the same as,
font-size: 14px; line-height: 16px;

CSS shorthand is not always reliable cross-browser.
For best cross-browser results body{ baselines are best practice along with baselines for other commonly used elements.
ie: P{ margin:;padding:;}

DWB 02-14-2011 06:36 PM

Thanks guys, I will re-write this.


All times are GMT -7. The time now is 03:50 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123