i’ve been having a small issue with the font-weight property, when I put it into the body tag, it doesn’t seem to work.(I have a < h1 > tag in my HTML which I don’t want in bold). Of course if I would put the font-weight:normal; property inside the ” * ” it works. But it doesn’t when I leave in the body. I know I can just use a h1 tag and put the font properties in there, but I’m curious as to why it isn’t working for me.
Thanks , and here is my CSS code.
* {
margin:0px;
padding:0px;
}
body {
background-color: #DCDBD9;
color: #2C2C2C;
font-weight:normal; /*this doesn't seem to work*/
font-size:100%;
font-family: Cambria, Georgia, sans-serif;
}
The
*selector will explicitely set thefont-weightto each individual element, thus overriding the defaultfont-weight:boldof anh1Setting
font-weight:normalto body won’t change a thing, since the defaultfont-weightvalue forbodyis normal.The
font-weightproperty on body won’t be inherited by children who have a browser default font-weight, such as an<h1>or a<strong>tag.