Problems with html formatting

Asked

Viewed 134 times

1

I have an image upload with text on a website and after inserting shows the images and text. The upload saves the images in a folder and yours path in the database. It’s supposed to look like this: inserir a descrição da imagem aqui

one below the other, thus organized. But when another is inserted, this happens:

inserir a descrição da imagem aqui

Stay one on top of the other! If help I leave here the code:

<div class="row" style="margin-bottom:25px">


      <?php 
        $con = mysqli_connect("localhost","root","","neo");
        mysqli_set_charset($con,"utf-8");

        $result = mysqli_query($con, "select * from know_how");

        while($row = mysqli_fetch_array($result)){
            $id = $row['id'];
            $txt = $row['texto'];
            $img = $row['ficheiro'];
            echo "<div class='col-md-6' style='padding: 10px;width:450px;height:355px'>
            <img data-toggle='modal' src='$img'class='img-responsive img-thumbnail' width='100%;' style='height:350px;'>
            <a href='apagarO.php?id=$id'><img src='../images/delete.png' width='20px' style='margin-left: 415px; '></a>
            </div>

            <div style='padding-top: 25px;'><p style='text-align:center;'>$txt</p></div>";
        }
      ?>

There’s the all. Can anyone help me? I really need this.

Thanks in advance!

1 answer

1


Place the property in your CSS

display : block;

or directly in your html tag

<div style="display:block"/>
//sua imagem

</div>

It will make you achieve the desired result

  • 'Cause I’ve tried it before but it’s still the same

  • in case, would put this attribute in the parent div of the html tag, already tried also?

  • i created a <div> and put <div style="display:block"> Code </div>. The code above all inside this <div>

  • 1

    there is no reason why the block isn’t working, add a class in the external div and create a css rule for that class, group all tags of an image into a bootstrap <div class="Row"> hug

  • You’re absolutely right it was a tag that I didn’t close that I was doing it. Thank you!

  • Out of nowhere, it happens! (:

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.