Reputation: 1289
I am trying to set this image: http://www.flaticon.com/free-icon/linkedin-logo_34405#term=linkedin&page=1&position=1 as my background image, but it doesn't work...
Error in parsing value for 'background-image'. Declaration dropped.
Code(HTML):
<div class="linkedin"></div>
Code(CSS):
.linkedin {
display: inline;
background-image: url(../images/Linkedin(Idle).png);
width: 16px;
height: 16px;
}
Upvotes: 1
Views: 626
Reputation: 1465
Change display: inline;
with display: inline-block;
, also add background properties:
.linkedin {
display: inline-block;
background-image: url('../images/Linkedin(Idle).png');
background-repeat: no-repeat;
background-position: 0 0;
width: 16px;
height: 16px;
}
Upvotes: 1
Reputation: 22911
Try this:
.linkedin {
display: inline;
background-image: url('../images/Linkedin(Idle).png');
width: 16px;
height: 16px;
}
The parenthesis in the middle are interfering with the parser, and it's assuming the image ends right after Idle)
Upvotes: 2