Hello guys,
I have this problem that I can't figure out on my own. I'm using Contao 4.4.1
I want my homepage to show Latest news - 4 latest news in horizontal order, NOT vertical. I have included bootstrap 4 css and all others css in my theme. I then edited the news_latest.html5 to add col-md-3.
Here is the code:
Code:
<div class="col-md-3">
<div class="nk-blog-post mb-0">
<?php $Isrc = Image::get($this->src, 360, 270, 'center_center'); ?>
<img class="nk-img-stretch"" src="<?php echo $Isrc; ?>" alt="<?php echo $this->newsHeadline; ?>">
<h2 itemprop="name"><?= $this->linkHeadline ?></h2>
<div class="nk-post-text ce_text block">
<?= $this->teaser ?>
</div>
</div>
</div>
I have also tried not touching the original template but just adding div with col-md-3 above it. The {{module::}} tag is nested inside a row, row is nested inside a container. The html file itself works fine when tested outside contao.
Just for the clearance. The module does understand col-md-3 as it makes appropriate width to each news element. However, it does not position them horizontaly (4 in one row), but stays vertical.
Thanks
Bookmarks