Default browser Style

Source: Internet
Author: User

A website summarizes the default styles of IE6/7/8/9, ff3.6.3, WebKit (r7042), and opera10.51, so that we can better understand the differences in CSS writing.

Address: http://www.iecss.com/

After getting familiar with this, you can understand

I. Reasons for using CSS reset.

Ii. * {margin: 0; padding: 0;} Why is it not recommended?

Iii. Why is cssreset widely circulated on the Internet not promoted?

 

From the comparison diagram, we can see that some labels do not actually have margin or padding. Some of these labels are rarely used. Even if they are used, they are generally customized.

For general applications, a simple CSS reset (on-demand) is enough. For example:

body,p,dl,dd,h1, h2, h3, h4, h5, h6,form{ margin: 0; }
ul,ol,input,fieldset{ margin: 0; padding: 0; }
ul,ol{list-style-type: none;}
img{ border: 0; }
option,em{ font-style:normal}
a{ text-decoration: none; color: #c9c9c9;}
a:hover{ text-decoration: underline; color: #31c8e1;}

In addition, you can directly look at the default WebKit style table and find the input: Focus option to see why the chrome input box is selected with a yellow border by default.

You can simply remove and reset it.

Input, textarea {outline: none ;}
Textarea {resize: none;} // remove the default size of textarea and drag it

IE is not clear about viewing the default style of the browser,

FF has a method on the Internet: Resource: // GRE/RES/html.css. However, this seems to be available only in versions earlier than 4.0. Versions later than 4.0 are packaged into the Omni of the installation directory. jar.

I do not know about WebKit and opera at the moment ···

 

Http://meiert.com/en/blog/20070922/user-agent-style-sheets/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.