YUI RESET CSS && YUI FONT CSS

When CSS Reset is included in a page, it removes the browser-provided styling for HTML elements.

CSS Reset can eliminate the default HTML style provided by the browser and reset the style of the browser. In various browsers, CSS selectors will default to some values. For example, when H1 is not set to a value, a certain size will be displayed. But not all browsers use the same value, so we have CSS Reset to make the style of web pages consistent in all browsers.

Have you ever used CSS Reset?Of course, you may use it, but you don’t know it’s being used. For example, you may use:

*{
padding:0;
margin:0;
border:0;
}

This is also a CSS Reset method to set padding, margin and border of all selectors to 0. This is a powerful method, the simplest and safest, but also the most resource intensive method. For a small website, using this will not bring a big waste of resources, but if it is a very large website like Yahoo, you need to reset CSS selectively to reduce the waste of resources.

The following is Yahoo’s CSS Reset code, which is also the most popular CSS Reset method. The method selected by YUI is as follows:

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,
form,fieldset,input,textarea,p,blockquote,th,td{
	padding:0;
	margin:0;
}
table
{
	border-collapse:collapse;
	border-spacing:0;
}
fieldset,img
{
	border:0;
}
address,caption,cite,code,dfn,em,strong,th,var
{
	font-weight:normal;
	font-style:normal;
}
ol,ul
{
	list-style:none;
}
caption,th
{
	text-align:left;
}
h1,h2,h3,h4,h5,h6
{
	font-weight:normal;
	font-size:100%;
}
q:before,q:after
{
	content:'';
}
abbr,acronym
{
	border:0;
}

OK, I believe you have understood the purpose of CSS Reset. Maybe you can write your own CSS Reset system according to your own preference. After all, everyone’s needs and habits are different.

Similar Posts: