Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 3 class="media-body" causes image to not be shown

I have the following code:

<div class="container-fluid>
    {files}
    <div class="media">
        <div class="media-left">
            <img src="<?php echo base_url('files/{filename}'); ?>" alt="afbeelding" class="media-object" style="width:200px">
        </div>
        <div class="media-body">
            <h4 class="media-heading">{title}</h4>
            <p>{text}</p>
        </div>
    </div>
    <br>
    {/files}
</div>

The current result is just the title and text being shown, without the image. When I remove the whole div with class "media-body", the image shows. I think my code is structured right, I followed the w3-schools example. How can I get both the image and text to show up in the bootstrap media format?

like image 319
Yaniiick Avatar asked Feb 04 '26 11:02

Yaniiick


1 Answers

Missing "

Change from

<div class="container-fluid>

to

<div class="container-fluid">
like image 66
dhruv jadia Avatar answered Feb 05 '26 23:02

dhruv jadia



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!