Reset CSS

27 June 2009

ปัจจุบันมี Web Browser หลากหลายครับ การจะ design web ให้แสดงผลบนทุก browser เหมือนกันจึงเป็นเรื่องสำคัญ 

การเขียนเว็บด้วย CSS จึงเป็นทางออกหนึ่งที่ดีครับ นอกจากจะแก้ไขง่าย, load เร็ว แล้วก็ยังสามารถแก้ปัญหาการแสดงผลบน browser ต่างๆได้ดีอีกด้วย แต่ก่อนที่เราจะเริ่มเขียน file CSS เราควรจะใส่ค่า เพื่อทำการ Reset file CSS ให้ทุก browser อ่านค่าเหมือนกัน อาจาร์ยเม่นได้ทำ Code reset CSS มาให้พวกเราใช้กัน จากการเรียน Course web development ของพวกเราอย่าลิม reset CSS ทุกครั้งก่อนสร้าง web นะครับ

/* CSS RESET */


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, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {margin: 0; padding: 0; outline: 0; font-size: 100%; font-family: Thonburi, “Lucida Grande”, Arial, Tahoma, Sans-Serif; vertical-align: baseline;}
:focus {outline: 0;}
body {line-height: 1; color: black; background: white; margin: 0; padding: 0}
ol, ul {list-style: none;}
table {border-collapse: separate;}

caption, th, td {font-weight: normal;}
blockquote:before, blockquote:after,
q:before, q:after {content: “”;}
blockquote, q {quotes: “” “”;}
body,p,td,th,ul,li{ color: #000; font-family: “Lucida Grande”, Arial, Tahoma; font-size: 12px; line-height: 15px;
margin: 0; padding: 0 }
.clearspace {clear:both; height:0px; padding:0px; margin:0px; width:0px;}
a { color: #888888; text-decoration: none; }
a:hover { color: #333; }
a:active { color: #333; }

ขอบคุณ ครูเม่นจาก imenn.com ครับ

Tags: ,

ทักทาย

หากต้องการให้มีรูปอวตาร (avatar) ประจำอีเมล กรุณา สมัครที่ Gravatar

Spam Protection by WP-SpamFree