Reset Css In Html
Very basic concepts css reset, everyone knows, but it will be new to those who started learning web, cut assembly layout. At first I made new wordpress theme is also known concept.
Reset css is to make the components in the html returned is 0, the components in your css bring available in values paading and margin, so we are very difficult to adjust as well as the calculation of the interface assembly.
This is the css that I use or
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
table {
border-collapse:collapse;
border-spacing:0;
}
fieldset,img {
border:0;
}
address,caption,cite,code,dfn,em,strong,th,var {
font-style:normal;
font-weight:normal;
}
ol,ul {
list-style:none;
}
caption,th {
text-align:left;
}
q:before,q:after {
content:'';
}
abbr,acronym { border:0;}
this one’s for HTML4, it does not have the components html5, if you want to reset for html5, can copy the code is also, relatively complete, the user is your HTML4 always home (remind you about a few new entrants)
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
you copy the code above and paste into the top of your css file, it makes the components of landmarks is 0.
I give you easy to understand example: long 20cm ruler, I want to put one point in our 5th cm, plus 5 cm from 0, but when plus 5 it is greater than 5, for example, 7 for example, mean milestones for calculating it is not 0 which is 2. To determine the correct, then we have to calculate from 0 onwards.
I like a Demon Walock saying that “You always have to start from somewhere”, who start from the number 0. This article may be too old and boring compared to a lot of people but I think it would have been useful for many people, it is the first step for you to make one website with beautiful interface.
If you copy my post, please remember to link the source to me.
This article is useful for you, press like on my help, encourage writing.