Well, in a .php file I echo some html (like a template) for every result (from search input):
while ($row = mysqli_fetch_array($result))
{
//image
echo "<img id=" . '"' . "myImg" . '"' . "src=" . '"' . "showImage.php?image=" . $row['shortcutImage'] . '"' . "class=" . '"' . "imageList" .'"' . ">";
//title
echo "<h5 class=" . '"' ."titleResult" . '"' . ">". $row['name_now'] . "</h5>";
//area
echo "<p class=" . '"'. "areaResult" . '"' . ">" . "Περιοχή: " . $row['area'] . "</p>";
//break between results
echo "<br>";
echo "<br>";
}
and the style
imageListis for imagetitleResultis for the<h5>areaResultfor<p>
.imageList{
margin-top: 10px;
clear: both;
width:100%;
max-width:250px;
float: left;
}
.titleResult{
color: rgb(17, 17, 17);
font-weight: 500;
margin-left: 35px;
margin-top: 20px;
}
.areaResult{
margin-top: 35px;
}
and of course the output I have: (Images names and area is tests)
