html - Two column different position -
i want not hard don't know how do.
now here have version mobile how looks now.
here have code.
$query = "select * my_table"; $res = mysqli_query($con, $query); $i = 0; while ($row = mysqli_fetch_assoc($res)) { if($i%2==0) { echo "<div class='row' style='margin-right:0; margin-left:0'> <div class='col-md-6' style='padding:0;''> <img class='image-width img-responsive' src='images/my_img/".$row['primary_img']."' /> </div><!--/span--> <div class='col-md-6 find-content' style='margin-top:8%;'> <img src='images/my_img/".$row['icon']."'/> <p style='font-family:gothambold;color:#ec1940;font-size:1.5em; margin-top:5%;'>".$row['title']."</p> <p style='width:50%;margin-left:25%;' class='text'>".$row['text']."</p> <a class='a-button' href='atractions.php?id=".$row['id']."'>hi</a> </div><!--/span--> </div><!--/row -->"; } else { echo " <div class='row' style='margin-right:0; margin-left:0'> <div class='col-md-6 find-content' style='margin-top:10%;'> <img src='img/descopera/icons/".$row['icon']."'/> <p style='font-family:gothambold;color:#ec1940;font-size:1.5em; margin-top:5%;'>".$row['title']."</p> <p style='width:50%;margin-left:25%;' class='text-descopera'>".$row['text']."</p> <a class='a-button' href='atractions.php?id=".$row['id']."'>hi</a> </div><!--/span--> <div class='col-md-6' style='padding:0;'> <img class='image-width img-responsive' src='images/my_img/".$row['primary_img']."' /> </div><!--/span--> </div><!--/row--> "; } $i++; }
i copied again code , used class of bootstrap named 'visible'
Comments
Post a Comment