Browser Compatibility Issues – Part V

Elements have different properties in different browsers. For example <ul> would have different margin and padding in IE from other browsers.

For this reason, many people have been using for long reset.css, which in turn resets all the property values which will return the values

ul {margin:0; padding:0; border:0; font-size:100%; font:inherit; vertical-align:baseline;}

This approach, though being useful, I did not always like using. I would rather reset my own properties for the element I see behaving differently or better style it right away.

A newer way for having your elements react similarly on different browsers is by using normalize.css , though this one is more HTML5 focused, and this is where the web is going if not there already..

The advantages would be mainly that it preserves some of the defaults which may be useful and not inconsistent with browsers. This is handy rather than resetting everything to zeros. With this being said, you will have more control over your elements styling. It also corrects some bugs which are not corrected by CSS. Here’s a full of list of the advantages of using normalize.css.

Another reference on Best Practices:

https://speakerdeck.com/dmosher/so-you-want-to-be-a-front-end-engineer

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s