Reputation: 5
I tried to make two separate div with different images attached to them. The problem is that when I put more than one div the second or the third image disappear and only the first in the CSS document appears.
HTML:
<div class="tokens">
<div class="imageGriff", id="testphoto"></div>
<div class="imageGriff" type="image" id="testphoto2"></div>
<div class="imageSly", id="testphototwo"></div>
</div>
CSS:
.imageSly {
content: url("/t2.png");
position: relative;
display: inline;
}
.imageGriff{
content: url("/token.png") no-repeat;
position: relative;
display: inline;
}
Upvotes: 0
Views: 63
Reputation: 80041
Your code isn't working due to syntax errors.
content
css property does not expect to have no-repeat
in it.imageSly {
content: url("//placehold.it/200x100");
position: relative;
display: inline;
}
.imageGriff {
content: url("//placehold.it/300x150");
position: relative;
display: inline;
}
<div class="tokens">
<div class="imageGriff" id="testphoto"></div>
<div class="imageGriff" id="testphoto2"></div>
<div class="imageSly" id="testphototwo"></div>
</div>
Upvotes: 3