h5bp / html5-boilerplate

A professional front-end template for building fast, robust, and adaptable web apps or sites.
https://html5boilerplate.com/
MIT License
56.27k stars 12.2k forks source link

Some misunderstanding with margin and padding size - "em" #376

Closed Nikita-S-Doroshenko closed 13 years ago

Nikita-S-Doroshenko commented 13 years ago

I'm very appreciate that you guys made and release such amazing thing like Boilerpalte, i first new about it from net.tutsplus.com, and i learn lot's of things from boilerplate, and your boilerplate add some cool rules and standards for future of web development.

But i can't find any information about correct values for margin and padding to use it in my future projects, which values better to use, i mean em or px? It's like about font-size, you guys use percents - % from YUI, and now i always use % :D But what about em? maybe it's better to use em always? And i notice you used em in your 1.0RC more often then in previous version.

rizkysyazuli commented 13 years ago

from what i know, it used to matter to use ems back when browsers uses different method for zooming the page. it was better for the user if you use ems and relative sizing. but i don't think it has any difference now whether ur using px or em.

but that's just me. maybe the other have a better explanation.

hokapoka commented 13 years ago

IIRC em was reccommended for use with IE6 for accessablity. IE wouldn't zoom text if it had px as the unit.

I find px to be acceptable now; as of a IE7 zoom has worked on fonts with the px unit.

nimbupani commented 13 years ago

For vertical rhythm I use ems for margin/padding - top/bottom, and depending on how I have the width specified (%, or ems or px) use the appropriate unit for horizontal margin/padding (or so I hope!).

Closing as this has nothing to do with BP itself, but would be glad to have this discussion continue on the mailing list