html - Place Ad after every third element - Laravel Foreach -
i'm trying change design of website doesn't work want ( allways ).
i want place full width div after every third element on website.
here picture how looks now:
and thats how want be:
thats code:
@foreach($usergroups $group) <div class="col-xs-12 col-sm-6 col-md-4"> <div class="jumbotron" id="jumbo"> // content of black boxes </div> @if($counter % 3 == 0) <div class="col-md-12"> // content of red boxed ( ad's google ) </div> @endif </div> <?php $counter-- ?> @endforeach
copy below styling in css , align below marked elements in single row , put fourth in next row.
.col-xs-12 .col-sm-6 .col-md-4{ float:left }
Comments
Post a Comment