Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Most Important CSS Techniques You Need To Know (trevordavis.net)
27 points by nreece on March 31, 2008 | hide | past | favorite | 6 comments



I was amazed that he had found a cross-browser way to make sure font-sizes match pixels. But when testing it i found that his 12 pixel header is 8 pixels on my screen (smaller) and his 36 pixel heading is 40 pixels (larger) :-( that's with a plain firefox. Am I the only one experiencing this, or is this feature just not usefull?


Different browsers vary on how they do rounding of font sizes. I believe most browsers now set font size 100% to be 16px.


For those looking for reset css, check here: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/


#3 is a prime example of why tables are good for layout.


his logic on the px size standardization works for a while then breaks,


an simpler way for consistant margins and padding is

* { margin: 0; padding: 0; }




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: