最初に指定しておくCSSを修正しました。

May
10

2009

先日紹介した『最初に指定しておくCSS』ですが、自分の中で色々と考えたり、作業の上でこっちの方が良いかも、と思えるようなことがいくつかあり、修正しました。改めて記事としてアップしておきます。

特にこれといって大きな変更があるわけではないのですが、リセットする要素の数と、フォントの指定の仕方、clearfixを少しずつ変更しています。

この修正分ですが、必ずしも前より使いやすくなっているとは限りません。むしろ人によっては、「え、こんなのリセットしないでよ」と思うところもあるかと思います。

世の中にはリセットCSSがあちこちにありますので、当サイトのものを使っている人はほとんどいないと思うのですが、もし使っている方がいらっしゃっいましたら、今回のでも前のものでもお好みでお使いください。多分、今後も修正版を上げることがあると思いますし。


/* =reset
----------------------------------*/

body,div,dl,dt,dd,ul,ol,li,
h1,h2,h3,h4,h5,h6,pre,form,
fieldset,legend,input,textarea,
p,blockquote,table,caption,
tbody,tfoot,thead,th,td,option{
margin:0;
padding:0;
}

table{
border-collapse:collapse;
border-spacing:0;
}

fieldset,img,
abbr,acronym{
border:0;
}

address,caption,cite,
code,dfn,th,var,
optgroup,strong,em,b,i{
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:'';
}

a,ins,del{
text-decoration: none;
}

img{
vertical-align: bottom;
}

object,embed,th,td{
vertical-align: top;
}

/* =common
----------------------------------*/

body{
font-size: 12px;
font-family: font-family: Arial, Helvetica, Verdana, Osaka, "メイリオ", Meiryo, "MS Pゴシック", sans-serif;
}

* html body{
font-size: 75%;
}

html{
overflow: scroll;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}

.fR{float: right;}
.fL{float: left;}
.cl{clear: both;}

/* =clearfix
----------------------------------*/

.clearfix:after{
content:".";
display:block;
visibility:hidden;
height:0.1px;
font-size:0.1em;
line-height:0;
clear:both;
}

.clearfix{
display:inline-block;
}

/* MacIE begin \*/
*+html .clearfix{
height:1%;
}

* html .clearfix{
height:1%;
}

.clearfix{
display: block;
}
/* Mac IE end */
ページトップへ

トラックバック(0)

トラックバックURL: http://www.tyto-style.com/mt/mt-tb.cgi/480

コメントする

お知らせ

最近はメインでSEO関連情報を中心に「SEOモード」というブログで活動しています。SEOやHTML等の情報に興味がある方はぜひ。