How to normalize filling and fields in browsers

How other designers normalize padding and margins in browsers. I tried resetting CSS (currently using YUI), but I still encounter a lot of inconsistencies.

It seems that some elements, with some browsers, set the registration or margin to 0px, will force the browser to use the deferred default margins defined by this browser. Is there a way to hard reset the fill or field throughout the browser so that it looks consistent?


Update

From the additional research and reviews here, it seems almost impossible to make sites look the same in different browsers for writing. I think I will stick with CSS reset and just try to better plan my sites.

I'm not sure how to overcome the default browser mechanisms that override the style settings, and probably this will be too much for that.

+6
css cross-browser css-reset
source share
3 answers

This is usually solved with CSS reset, but not all of them are complete. In some browsers, the general body must have its border equal to 0 (i.e. Opera, and sometimes IE) in order to be truly the same. Try the following:

body,html{margin:0;border:0;padding:0;}

Since you are not saying which element or giving a link, I cannot go too far. What elements do you encounter?

+1
source share

You should not add additional CSS interactions and additional code to add a complete set of "normalized" additions or field elements.

It’s best to style what you need by explicitly specifying indents and margins for the elements you use on your pages.

+1
source share

Gaskets are usually 0. These are the fields that are the most unbalanced among browsers. Just define your own fields on the HTML block . CSS reset is like a sledgehammer. You will need to redefine more than just the fields. But this can be useful for beginners, as they often cannot at first glance distinguish between inline and locked elements by default in HTML. CSS reset will force them to override the same "correct path".

Related questions:

  • Are margin and padding the most unbalanced among browsers?

However, if you continue to see inconsistencies between browsers, it may happen that you use doctype, which causes the browser to quirksmode . In MSIE, the box model error will now come to life. Would you like to use strict doctype: <!DOCTYPE html> .

See also:

+1
source share