Reply
Old 01-12-2009, 12:16 PM CSS - Starting tip
SolidEagle's Avatar
Experienced Talker

Posts: 30
Name: Arjan Nijmeijer
Location: Stadskanaal
Trades: 0
Good webdevelopers know, when you want to build a website the best way is to use HTML to build your site only, without style properties. All the styling has to be done by the CSS file.

As the most of you already know there standard values in browsers for specific html tags. Like the <strong></strong> means "extra emphasis" but Internet Explorer makes it bold!... also padding and margins sometimes have standard values....

I always started my CSS with his::

Code:
*{
 padding:0;
 margin:0;
}
And it really helps me to get rid of major problems! But a friend told me of a disadvantage using the *. By using this it will first add the padding and margins on ALL your objects! This can slow down your website a LOT.

A better method would be:

Code:
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;
}
This will also exclude every defined style from your HTML page. So in my opinion this is extremly usefull when you start making a website, cause all the style have to be programmed in the css now and thats the way it should be done!

Source: http://developer.yahoo.com/yui/reset/
__________________
The Eagle Soars Above You!
www.nijm.nl
SolidEagle is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Reply     « Reply to CSS - Starting tip
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.10088 seconds with 13 queries