Answer the question
In order to leave comments, you need to log in
bootstrap and php conflict?? Or is it something else?
Good afternoon!
I'm making a project using bootsprap. You can see here tt90.ru/newmulti.ru/parts/cockoo.php Faced the following problem:
When displaying images from the database, they are stretched, despite the addition of the img-responsive class.
The next step I wrote a php script that adjusts pictures of different sizes to the same one. But it works only when (!) when I add the img-responsive class!!! But after all should work and without it!!?
Further, to the right of the mini-image, a description of the category should be displayed, which also falls to the bottom, to the footer ... I registered float: right; But the effect is "0". It seems that bootstrap "interferes" with positioning divs.
I will be grateful for help. Once again, a link to the project tt90.ru/newmulti.ru/parts/cockoo.php
And code;
<?php
$result = mysql_query("SELECT * FROM table_food", $link);
if( mysql_num_rows($result) > 0)
{
$row = mysql_fetch_array($result);
do{
//мини-изображения
if ($row["image"] != "" && file_exists('..'.$row["image"]))
{
$img_path = ('..'.$row["image"]);
$max_width = 200;
$max_height = 200;
list($width,$height) = getimagesize($img_path);
$ratioh = $max_height/$height;
$ratiow = $max_width/$height;
$ratio = min($ratioh, $ratiow);
$width = intval($ratio*$width);
$heidht = intval($ratio*$height);
}
else
{
$img_path = "/uploads_images/no-image.jpg";
$width = 110;
$height = 200;
}
//мини-изображения
echo '
<div class="my_wrapp">
<div class="my_content">
<div class="images_grid">
<img src="'.$img_path.'" width="'.$width.'" height="'.$height.'" alt="...">
</div><!--images_grid-->
<div class="my_description">
<h4>'.$row["title"].'</h4>
<p>'.$row["mimi_features"].'</p>
<a href="№" class="my_comments">Комментарии(0)</a>
</div><!--my_description-->
<div class="clear"></div>
</div><!--my_content-->
<div class="sidebar"></div>
</div><!--my_wrapp-->
';
}
while ($row = mysql_fetch_array($result));
}
?>
Answer the question
In order to leave comments, you need to log in
You can't layout. Even bootstrap.
Humble yourself.
And your php is not very good, who does it? What is the calculation of width, height, why is it needed?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question