I have a div class like so:
<div class="website-wrapper" data-content="63%"></div>
I have javascript that changes the data-content:
$(this).children().closest('.website-wrapper').attr('data-content', (imageHeight/imageWidth*100)+"%");
And I have my css declaration like this:
.website-wrapper:after { padding-top: attr(data-content); display: block; content: ''; }
For some reason, I can't get the padding-top to work correctly. Is there something I doing wrong?
.website-wrapperhave the right ratio for the image responsively.