Mobile app version of vmapp.org
Login or Join
Merenda212

: If I override in CSS, does it retain any style elements? If I override the HTML tag <STRONG> in CSS by specifying a different font weight and size, does it retain any other style settings

@Merenda212

Posted in: #Css #Html

If I override the HTML tag <STRONG> in CSS by specifying a different font weight and size, does it retain any other style settings or properties?

strong {
font-weight:700;
font-size: 12px;
}


I ask because I'm getting odd font weight differences between browsers (chrome and IE)

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Merenda212

2 Comments

Sorted by latest first Latest Oldest Best

 

@Ogunnowo487

Yes,
here you are overriding 2 css properties,
but if others are defined (by browser or another css rule) they will still be in use.

10% popularity Vote Up Vote Down


 

@Shelton105

You don’t really override markup in CSS, you just set properties on elements. Setting font-weight: 700 just coincides with browser defaults, as 700 equals bold. Setting font-size sets just that property, but this in turn may have complex and partly browser-dependent visual effect.

Without more information, this is just an educated guess: what you are seeing is rendering differences between browsers. Probably not font weight but e.g. differences in subpixel rendering, making stroke widths look a little different.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme