Forum

Thread tagged as: Question

Bootstrap Carousel: image invisible

Here's my code for the items:

<div class="item<perch:if exists="perch_item_first"> active</perch:if>">
    <img src="<perch:content type="image" id="image" label="Image" width="100%" />" alt="<perch:content type="text" id="alt" label="Bildlegende" required="true" help="SEO relevant!" title="true" />" class="img-responsive"/>
</div>

Any idea why my images embeded from my assets are not visible? I can see the alt-tag, so the code is working... Many thanks!

Martin Stettler

Martin Stettler 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

width="100%" isn't a valid option for Perch. It has no way of knowing what that's 100% of. You need to use an integer representing a pixel dimension.

Ok, I didn't know that. I put the width attribute in a class and it's working fine, no width in the image-tag. Thanks!