Jump to content

Css Defaults


trinistorm

Recommended Posts

Does anyone have an idea where one can get the default Css values for all tags? I figured W3 would have something but im looking for a more complete reference.

Link to comment
Share on other sites

I think the answer lies in the browser. From what I've learned is that browsers (IE, FF, Chrome, Safari, etc) have their own defaults by which they use to render page elements by (possbily in a css stylesheet within the programs directory). This is whats accounts for the slight variations in webpages when looked at through different browsers, albeit the code remaining the same.

Link to comment
Share on other sites

I think the answer lies in the browser. From what I've learned is that browsers (IE, FF, Chrome, Safari, etc) have their own defaults by which they use to render page elements by (possbily in a css stylesheet within the programs directory). This is whats accounts for the slight variations in webpages when looked at through different browsers, albeit the code remaining the same.
I see then perhaps i should check out Mozilla's developers pages. Im trying to style an html button to look like an image but the padding won't disappear completely i am curious to know what causes this.
Link to comment
Share on other sites

whats your code? if you want to remove all paddings or defaults, you can use the universal selector

*{padding: 0px;}

and now all elements will have 0 padding.

Link to comment
Share on other sites

Tried it and it dosen't work i still get a little space between the button and its label. My code is like this:

<button id='button'><img src='$img_path' id='img'/></button>"

then the css:

#button{width:200px;padding:0;margin:0;overflow:visible;#img{padding:0;margin:0;width:inherit;}

I am using an image for the button face but i still get a small bit of padding which can be hidden by background:none; of course but its still there. That is what made me curious about the css defaults.

Link to comment
Share on other sites

I don't know if using an actual unit (like px) might make a difference. Most likely though its an element rendering default not changeable by CSS, much how like buttons and radio buttons in Safari are rounded. Maybe a strict DTD might help...also, i just noticed your #button doesn't have a closing bracket. Are you using the universal selector in your stylesheet?

Link to comment
Share on other sites

That is a mistake in typing sorry. And yeah it might be something along those lines the '*' does nothing different

Link to comment
Share on other sites

I can however use an java applet and create my own buttons. A bit of work but a nice pass time. thanks for the advice.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...