I am generating new cards with PHP code, but they do not listen to the grid of bootstrap 4. Raw html code works fine and displays them like they should be.
<div class="container-fluid padding"> <div class="row padding"> <?php foreach ($contacts as $contact): ?> <div class="col-sm-12 col-md-4"> <div class="card"> <?php echo '<img class="card-img-top" src="data:image/png;base64,'.base64_encode( $contact['horse_image'] ).'"/>'; ?> <div class="card-body"> <h4 class="card-title"><?=$contact['horse_name']?></h4> <p class="card-text"><?=$contact['short']?></p> </div> </div> </div> </div> <?php endforeach; ?> </div> <hr class="my-4"> </div>
Sorry, can't comment yet because of the reputation of 50 :D
In your foreach block is one closing div tag too much ;)
1.4m articles
1.4m replys
5 comments
57.0k users