Top CSS Mistakes Web Developers Make
Category: CSS, CSS3 Tutorial | 1,691 views | 1 Comment |
1. Not Using a Proper CSS Reset
Web browsers are our fickle friends. Their inconsistencies can make any developer want to tear their hair out. But at the end of the day, they’re what will present your website, so you better do what you have to do to please them.
One of the sillier things browsers do is provide default styling for HTML elements. I suppose you can’t really blame them: what if a “webmaster” chose not to style their page? There has to be a fallback mechanism for people who choose not to use CSS.
In any case, there’s rarely a case of two browsers providing identical default styling, so the only real way to make sure your styles are effective is to use a CSS reset.
What a CSS reset entails is resetting (or, rather, setting) all the styles of all the HTML elements to a predictable baseline value. The beauty of this is that once you include a CSS reset effectively, you can style all the elements on your page as if they were all the same to start with. It’s a blank slate, really.
There are many CSS reset codebases on the web that you can incorporate into your work. I personally use a modified version of the popular Eric Meyer reset and Six Revisions uses a modified version of YUI Reset CSS. You can also build your own reset if you think it would work better.
What many of us do is utilizing a simple universal selector margin/padding reset.
* { margin:0; padding:0; }
Though this works, it’s not a full reset. You also need to reset, for example, borders, underlines, and colors of elements like list items, links, and tables so that you don’t run into unexpected inconsistencies between web browsers. Read more…
- Top Useful CSS Tips For Beginners
- Top 15 CSS articles
- 150 CSS Examples
- How to design css sitemap Tree
- CSS tricks
- Write a CSS Syntax
- How CSS3 works
- Benefits of CSS
- What it’s all about CSS3
- CSS QUOTES






