Skip to content Skip to sidebar Skip to footer

Class Row In Style.php

Im working on a article: I want 3 in one row. I know how to do it with stype, but i dont know how to do it with style.php. enter image description here This is only the part of cod

Solution 1:

Well, you are dealing the problem really improperly. I don't really get why you need to use a variable named $grid while you can directly pass the grid attribute to your .container. You don't have do complicate it like this. What I would do in your case would be the next thing:

I would create a class named .grid like:

   .grid {
       display: grid !important;
     }

As for the rest I would put it like this: Please provide more info as regards how you extract out the $row variable data. The layout per se, would have to be like this in order for you to have 3 cards in a row. Hope that helps you. Cheers

<div class="container grid">
    <div class="row padding">
      <div class="col-md-12 col-sm-12">
        <div class="col-md-4 col-sm-4">
           <div class="card">
                <img src="<?= '"'. UPLPATH . $row['slika'] . '"' alt="whatever 
            you need" />
                  <div class="card-body">
                       <h6 class="card-title">
                          <?php  echo '&laquo;' . " ". $row['naslov']; ?>
                       </h6>
                  </div>
            </div>
        </div>
         <div class="col-md-4 col-sm-4">
           <div class="card">
                <img src="<?= '"'. UPLPATH . $row['slika'] . '"' alt="whatever 
            you need" />
                  <div class="card-body">
                       <h6 class="card-title">
                          <?php  echo '&laquo;' . " ". $row['naslov']; ?>
                       </h6>
                  </div>
            </div>
        </div>
        <div class="col-md-4 col-sm-4">
           <div class="card">
                <img src="<?= '"'. UPLPATH . $row['slika'] . '"' alt="whatever 
            you need" />
                  <div class="card-body">
                       <h6 class="card-title">
                         <?php  echo '&laquo;' . " ". $row['naslov']; ?>
                       </h6>
                  </div>
            </div>
        </div>
      </div>
    </div>

Post a Comment for "Class Row In Style.php"