tirenweb
tirenweb

Reputation: 31709

Font-weight doesn't work for labels in Chrome

I have this line in my code:

<label style="font-weight: bold" for="sedii18n_codice_paese_indirizzo">Codice paese indirizzo</label>

but the label is showed normal.

If I go to the Chrome Inspector I can see this:

font-weight: normal !important;

If I change font-weight in the inspector the weight of the font is modified normally.

Upvotes: 4

Views: 19422

Answers (3)

Sangram_2020
Sangram_2020

Reputation: 99

You can create a separate .css file for label tag and mention it as below: -

.lbl { font-weight : normal; }

Inside html file: -<label class = "lbl" for="sedii18n_codice_paese_indirizzo">Codice paese indirizzo</label>

This is working for me as well as overridden in google chrome.

Upvotes: 0

Patrick Ferreira
Patrick Ferreira

Reputation: 2053

have you take a look on the top right corner of your active element in the inspector?

You can find which stylesheet is overwriting you code

Upvotes: 2

Jez
Jez

Reputation: 29993

Looks like something else is overriding your bold style, hence the !important tag. Chrome Inspector should tell you where the font-weight: normal !important; is being applied. You can try putting font-weight: bold !important; inside your style attribute to override this override. :-)

Upvotes: 11

Related Questions