/// Глобальный сброс в CSS

Глобальный сброс CSS обычно применяют для более-менее одинакового отображения сайтов в различных браузерах. По умолчанию разные браузеры имеют различные значения для margin, padding и line-height. Глобальный сброс позволяет установить одинаковые значения этих величин во всех браузерах.Глобальный сброс Эрика Мэйера

 

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, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td
{
 border: 0;
 font-family: inherit;
 font-size: 100%;
 font-style: inherit;
 font-weight: inherit;
 margin: 0;
 outline: 0;
 padding: 0;
 vertical-align: baseline;
}
:focus
{
 outline: 0;
}
body
{
 background: white;
 color: black;
 line-height: 1;
}
ol, ul
{
 list-style: none;
}
table
{
 border-collapse: separate;
 border-spacing: 0;
}
caption, th, td
{
 font-weight: normal;
 text-align: left;
}
blockquote:before, blockquote:after, q:before, q:after
{
 content: "";
}
blockquote, q
{
 quotes: "" "";
}

Yahoo! UI Library: CSS сброс

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;
}
h1,h2,h3,h4,h5,h6
{
 font-size: 100%;
 font-weight: normal;
}
q:before,q:after
{
 content: '';
}
abbr,acronym
{
 border: 0;
}

Глобальный сброс стилей CSS (Kyle Neath)

*
{
 margin: 0;
 padding: 0;
}
h1, h2, h3, h4, h5, h6, p, pre, blockquote, label, ul, ol, dl, fieldset, address
{
 margin: 1em 0;
}
li, dd
{
 margin-left: 5%;
}
fieldset
{
 padding: .5em;
}
select option
{
 padding: 0 5px;
}
.hide, .print-logo, .close-button
{
 display: none;
}
.left
{
 float: left;
}
.right
{
 float: right;
}
.clear
{
 clear: both;
 font-size: 1px;
 height: 1px;
 line-height: 1px;
}
a img
{
 border: none;
}

Глобальный сброс (Павел Марковнин)

html
{
 background: #f7f4ea url(../images/bodyBg.gif) top left repeat-x;
 color: #2d2d2d;
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 10pt;
 line-height: 1.4em;
}
*
{
 _line-height: 1.4em;
 font-size: 100%;
 line-height: inherit;
 margin: 0;
 outline: none;
 padding: 0;
}
input, textarea
{
 padding: 0.2em;
}
img, a:link img, a:visited img, a:hover img, a:active img
{
 border: 0;
}
a:link
{
 border: 0;
 border-bottom: 1px solid;
 color: #0e8db7;
 font: inherit;
 text-decoration: none;
 text-decoration: underline;
}
a:active
{
 border: 0;
 border-bottom: 1px solid;
 color: #0e8db7;
 font-size: 100%;
 text-decoration: none;
 text-decoration: underline;
}
a:hover
{
 border: 0;
 border-bottom: 1px solid;
 color: #cc4e4e !important;
 font-size: 100%;
 text-decoration: none;
 text-decoration: underline;
}
a:visited
{
 border: 0;
 border-bottom: 1px solid;
 color: #9268b5;
 font-size: 100%;
 text-decoration: none;
 text-decoration: underline;
}
a.dashed:link, a.dashed:active, a.dashed:visited
{
 border-bottom: 1px dashed;
 color: #0e8db7;
 text-decoration: none;
}
a.dashed:hover
{
 border-bottom: 1px dashed;
 text-decoration: none;
}
h1
{
 color: #0e8db7;
 font-size: 1.8em;
 font-weight: normal;
 margin: 0.2em 0 0.6em 0;
}
h2
{
 color: #0e8db7;
 font-size: 1.7em;
 font-weight: normal;
 margin: 0.8em 0 0.5em 0;
}
h3
{
 font-size: 1.6em;
 font-weight: normal;
 margin: 0.7em 0 0.5em 0;
}
h4
{
 font-size: 1.3em;
 font-weight: normal;
 margin: 0.5em 0 0.4em 0;
}
h5
{
 font-size: 1.2em;
 font-weight: normal;
 margin: 0.5em 0 0.4em 0;
}
h6
{
 font-size: 1.1em;
 margin: 0.5em 0 0.4em 0;
}
p
{
 margin: 0.8em 0 0.9em 0;
}
table
{
 border: 0;
 border-collapse: collapse;
}
table td, th
{
 padding: 0;
 text-align: left;
 vertical-align: top;
}
ul, ol
{
 margin: 0.2em 0 1.4em 0;
 padding: 0 0 0 2em;
}
ul li, ol li
{
}
small, sup, sub
{
 font-size: 0.8em;
}
big
{
 font-size: 1.2em;
}
ul li
{
 background: url(../images/bullet.gif) 0 0.5em no-repeat;
 list-style-type: none;
 margin: 0.5em 0;
 padding: 0 0 0 15px;
}

Мастер стили

html, body
{
 border: 0;
 margin: 0;
 padding: 0;
}
body
{
 font: 100%/1.25 Arial, Helvetica, sans-serif;
}
h1, h2, h3, h4, h5, h6
{
 font-weight: normal;
 margin: 0;
 padding: 0;
}
h1
{
 font-size: 2em;
 letter-spacing: -1px;
 padding: 30px 0 25px 0;
}
h2
{
 font-size: 1.5em;
 letter-spacing: -1px;
 padding: 20px 0;
}
h3
{
 font-size: 1em;
 font-weight: bold;
}
p, ul, ol
{
 margin: 0;
 padding: 0 0 1.25em 0;
}
ul, ol
{
 padding: 0 0 1.25em 2.5em;
}
blockquote
{
 margin: 1.25em;
 padding: 1.25em 1.25em 0 1.25em;
}
small
{
 font-size: 0.85em;
}
img
{
 border: 0;
}
sup
{
 bottom: 0.3em;
 position: relative;
 vertical-align: baseline;
}
sub
{
 bottom: -0.2em;
 position: relative;
 vertical-align: baseline;
}
acronym, abbr
{
 border-bottom: 1px dashed;
 cursor: help;
 letter-spacing: 1px;
}
a, a:link, a:visited, a:hover
{
 text-decoration: underline;
}
form
{
 display: inline;
 margin: 0;
 padding: 0;
}
input, select, textarea
{
 font: 1em Arial, Helvetica, sans-serif;
}
textarea
{
 line-height: 1.25;
 width: 100%;
}
label
{
 cursor: pointer;
}
table
{
 border: 0;
 margin: 0 0 1.25em 0;
 padding: 0;
}
table tr td
{
 padding: 2px;
}
#wrap
{
 margin: 0 auto;
 width: 960px;
}
.clear
{
 clear: both;
}
.float-left
{
 float: left;
}
.float-right
{
 float: right;
}
.text-left
{
 text-align: left;
}
.text-right
{
 text-align: right;
}
.text-center
{
 text-align: center;
}
.text-justify
{
 text-align: justify;
}
.bold
{
 font-weight: bold;
}
.italic
{
 font-style: italic;
}
.underline
{
 border-bottom: 1px solid;
}
.highlight
{
 background: #ffc;
}
.wrap
{
 margin: 0 auto;
 width: 960px;
}
.img-left
{
 float: left;
 margin: 4px 10px 4px 0;
}
.img-right
{
 float: right;
 margin: 4px 0 4px 10px;
}
.nopadding
{
 padding: 0;
}
.noindent
{
 margin-left: 0;
 padding-left: 0;
}
.nobullet
{
 list-style: none;
 list-style-image: none;
}


-2 не понравилось

/// Комментарии к новости

Ответить

Дата: 29 ноябрь 2013, 00:12 Группа: Гости
Цитата: smaujier
Очень интересно опробовать было все варианты!

+1
Дата: 28 ноябрь 2013, 23:50 Группа: Администраторы
Очень интересно опробовать было все варианты!
/// Оставить комментарий
Имя:* E-Mail:
Введите два слова, показанных на изображении: *
Тиц и pr сайта
© 2024 MyFreeProject.com
Все права защищены.
myFreeProject.com » Вебмастер » CSS » Глобальный сброс в CSS
НАВЕРХ ↑