Results 1 to 2 of 2

Thread: News list won't use col-md-3 horizontaly

  1. #1
    New user
    Join Date
    05-17-16.
    Posts
    5

    Default News list won't use col-md-3 horizontaly

    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

  2. #2
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Always post a link in such cases, so we can analyse and find the cause.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •