0

I just ran my site through the W3C CSS Validator and it came out with a total of 3146 warnings.

Most of them are redefinition warnings like these:

.fa.fa-check    Redefinition of color
.fa.fa-check    Redefinition of color
.fa.fa-check    Redefinition of font-size
.fa.fa-check    Redefinition of font-size
.fa.fa-check    Redefinition of background-color
.fa.fa-check    Redefinition of background-color
.fa.fa-check    Redefinition of display
.fa.fa-check    Redefinition of display
.fa.fa-check    Redefinition of height
.fa.fa-check    Redefinition of height
.fa.fa-check    Redefinition of line-height
.fa.fa-check    Redefinition of line-height
.fa.fa-check    Redefinition of width
.fa.fa-check    Redefinition of width
.fa.fa-check    Redefinition of text-align
.fa.fa-check    Redefinition of text-align

This is the script:

.fa.fa-check 
{
    color: #81D742;
    font-size: 3em;
    background-color: #F7F7F7;
    border: 2px solid #DCDCDC;
    border-radius: 110px;
    display: inline-block;
    height: 110px;
    line-height: 110px;
    width: 110px;
    text-align:center;
    padding: 0px;
}

I can't figure out what to change for these warnings to disappear.

From what I've read, the redefinition warnings usually appear when there is a duplicate definition in the style sheet, but the only problem is that I can't find any duplicate definitions.

Does anyone have any tips or tricks to fix this?

unor
  • 92,415
  • 26
  • 211
  • 360

1 Answers1

2

You have several instance of the .fa.fa-check in your website. the css validator considerate you try to redefine the class.

Try to let only one instance of yout .fa.fa-check classes and it will solve the issue one this class.

jeremy-denis
  • 6,368
  • 3
  • 18
  • 35
  • 1
    The script that I posted above is the only occurrence of .fa-fa.-check in the entire html-document. – Jeanette Haugsdal May 06 '16 at 18:01
  • ok and do you import external stylesheet ? what i'm asking is if you redefine to time the class somewhere. – jeremy-denis May 06 '16 at 18:05
  • The only external stylesheet that I use is this one: https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css – Jeanette Haugsdal May 06 '16 at 18:09
  • i don't get warning about your code when i validate the css with the W3C validator by direct input. Which method do you used to validate you website ? – jeremy-denis May 06 '16 at 18:14
  • Then there must be something elsewhere in the html-document. I used validation by URI and the address http://www.esigaretten.no/. – Jeanette Haugsdal May 06 '16 at 18:19
  • yes your are right i saw the error now. Why do you have several style tag in your page ? It's not the reason but what i can advice you it's to externalise your css in a stylesheet document or have only one style tag. – jeremy-denis May 06 '16 at 18:23
  • I have no idea why they're cut up like this since I created the website with a web builder in the beginning. But now I can see that there actually are three different occurrences of .fa.fa-check in the different style-tags with different values for border-radius, height, line-height and and width. – Jeanette Haugsdal May 06 '16 at 18:37
  • yes that why you have the issue. Like you have several instance of the .fa.fa-check the css validator considerate you try to redefine the class. – jeremy-denis May 06 '16 at 18:39
  • There must be a reason for the different values and I'll try to figure this out, but thank you so much for getting me this far. – Jeanette Haugsdal May 06 '16 at 18:43