兵庫県神戸市・明石市のホームページ制作会社 – 飛び立つチカラを、共にカタチに

CSS 初期設定 リセット用スニペット

Date 11月 22, 2007 Author soratomo Comment No Comments

YUI:Yahoo User Interface ライブラリにある「fonts」のスタイルシートを利用し、IEとモダンブラウザ間のフォントサイズの差異を、ある程度に抑えれる。また、フロートテクニックとしてよく使う ClearFix なども入れ得。

/*2007.11.22更新
==================================================================Reset*/
body,div,
ul,ol,li,dl,dt,dd,
form,fieldset,input,textarea,
h1,h2,h3,h4,h5,h6,pre,code,p,blockquote,hr,
th,td {
margin:0;
padding:0;
}
body {
/*yahoo UI:http://developer.yahoo.com/yui/fonts*/
font:13px/1.22 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro W3', 'メイリオ',Meiryo, 'MS Pゴシック', Arial, verdana, sans-serif;
*font-size:small;
*font:x-small;
line-height: 1.5;
background-color:transparent;
text-align: center;
color: #666666;
min-height: 100%;
}
/*html:\66irst-child body {
font-size:12px; safari only \
}*/
a {
text-decoration:underline;
outline:none;
}
a:link {
text-decoration:none;
color:#3f75fb;
}
a:visited {
text-decoration:none;
color:#3f75fb;
}
a:hover,a:active {
text-decoration:none;
color:#ff0000;
}
a img,:link img,:visited img {
border:none;
}
/* delate dot boader of link for New Mozilla \*/
a {
overflow:hidden;
}
img,fieldset,abbr,acronym {
border:0;
}
table {
font-size:inherit;
font:100%;
border-collapse:collapse;
border-spacing:0;
}
/*ul,ol {
list-style-type:none;
}*/
th,caption {
text-align:left;
}
input,select,textarea{
font:99% arial,helvetica,clean,sans-serif;
/* for macIE5 \*/
font-family:"Hiragino Kaku Gothic Pro","Osaka","MS Pゴシック",Verdana,sans-serif;
font-weight:bold;
}
select option {
padding : 0 0.5em;
}
form label{
cursor : pointer;
}
input:focus,select:focus,textarea:focus{
background-color: #ccffff;
}
pre,code,kbd,samp,tt {
font-family:monospace;
*font-size:108%;
line-height:99%;
}
q:before,q:after {
content:'';
}
hr {
border:0;
height:1px;
background-color:#000000;
color:#000000;
}
address {
font-style:normal;
}
/* strict reset by uncommenting lines below */
address,caption,cite,code,dfn,em,strong,b,u,s,i,th,var {
/* font-style:normal; */
/* font-weight:normal; */
}
/*almost default*/
.iLeft {
float:left;
}
.iRight {
float:right;
}
.fObject {
width:auto;
height:auto;
line-height:0;
}
/*

*/ .cboth { clear:both; height:0;} *html .cboth { height:.1em; overflow:hidden; margin-top:-.1em; } .cboth hr { visibility:hidden; border:0; } /*float clear*/ .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .clearfix { display:inline-block; min-height:1%; /* for IE 7*/ } /* Hides from IE-mac \*/ *html .clearfix { height: 1%; } .clearfix { display:block; }

  ·   Categories:  WEB制作

Leave a Reply