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:

thats how looks now

and thats how want be:

thats how want it

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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -