html - Multiple content:url Images -
i trying add multiple images page using css. doing way rather in more 'straight forward' way ensure mobile compatibility (it allows me set percentage widths images allows me them display @ right size on mobile).
i have in stylesheet:
div.image { content:url(http://example.com/example-image1.jpg); width:100% } div.image2 { content:url(http://example.com/example-image2.jpg); width:25% }
, few more images. , in parts of page:
<div class="image"> </div> <div class="image2"> </div>
the problem getting content:url seems working in first instance, picture displays. doesn't seem problem multiple div.s if set 2nd div same content:url image first div, image display twice.
sorry if dumb/noob question...i couldn't find answer.
you forgot bracket :
div.image2{ content:url(http://example.com/example-image2.jpg); width:25% }
edit: tried bracket , worked. use chrome version 59.
Comments
Post a Comment