How to show a whole image

Asked

Viewed 130 times

0

Well, I removed a layout from the internet to edit it, but when I do <img src=""> and then I put a <a> back and a <a> the front of the image, I only see a part of the image and I do not see the whole image, as I can do to display the whole image and not only a part of the image.

Complete Code:

<?php
include("config.php");


?>

<?php
$idcarro = $_GET["idcarro"];

$verifica = mysqli_query($link, "SELECT * from carros where id='$idcarro'");
$array = mysqli_fetch_array($verifica);

$verifica2 = mysqli_query($link, "SELECT * from imgcarros where idcarro='$idcarro'");

?>


<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php echo $array["marca"]; ?> <?php echo $array["modelo"]; ?> - Segmento Casual</title>
    <link href='http://fonts.googleapis.com/css?family=Titillium+Web:400,200,300,700,600' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Raleway:400,100' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <link rel="stylesheet" href="css/owl.carousel.css">
    <link rel="stylesheet" href="style.css">
    <link rel="stylesheet" href="css/responsive.css">


    <style>
    body { height: 100vh; overflow: hidden; margin: 0; padding: 0; }
    #paragrafo{

            font-family: "Trebuchet MS", Times, serif;

    }

    </style>
     <link rel="stylesheet" href="bjqs.css">
    <link href='http://fonts.googleapis.com/css?family=Source+Code+Pro|Open+Sans:300' rel='stylesheet' type='text/css'> 
    <link rel="stylesheet" href="demo.css">
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script src="js/bjqs-1.3.min.js"></script>

  </head>
  <body>



    <div class="site-branding-area">
        <div class="container">
            <div class="row">
                <div class="col-sm-6">
                    <div class="logo">
                        <h1><a href="./"><img src="img/logo.png"></a></h1>
                    </div>
                </div>

                <div class="col-sm-6">

                </div>
            </div>
        </div>
    </div> <!-- End site branding area -->

    <div class="mainmenu-area">
        <div class="container">
            <div class="row">
                <div class="navbar-header">


                </div> 
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="index.php">Início</a></li>
                        <li><a href="sobrenos.php">Sobre Nós</a></li>
                        <li><a href="contacto.php">Contacto</a></li>
                    </ul>
                </div>  
            </div>
        </div>
    </div> <!-- End mainmenu area -->

    <div class="product-big-title-area">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                </div>
            </div>
        </div>
    </div>

    <div class="single-product-area">
        <div class="zigzag-bottom"></div>
        <div class="container">
            <div style="margin-left:0.1%; margin-top:-4%;" class="row">




                    <!-- Fim do Padrão com o Site -->

                <b style="font-size:23px;"><?php echo $array["marca"]; ?>

                <?php echo $array["modelo"]; ?>
                </b>

                <br>
                <br>
                <br>
                <div style="font-size:17.5px;">
                Marca: <?php echo $array["marca"]; ?>
                <br>
                Modelo: <?php echo $array["modelo"]; ?>
                <br>
                Combústivel: <?php echo $array["combustivel"]; ?>
                <br>
                Preço: <?php echo $array["preco"]; ?>€
                <br>
                Ano: <?php echo $array["ano"]; ?>
                <br>
                Quilómetros: <?php echo $array["quilometros"]; ?>
                <br>
                Contacto: 912661231
                </div>

                <!-- Fim do que interessa -->

<!-- Inicio Slide -->

<div style="margin-top:-20%; margin-right:-11%;" id="container">


      <div id="banner-fade">
      <a>
        <ul class="bjqs">
        <?php while($array2 = mysqli_fetch_array($verifica2)){ ?>
          <li><a><img style src="admin/<?php echo $array2["img"]; ?>"></a></li>


        <?php } ?>
        </ul>
        </a>
      </div>
      <script class="secret-source">
        jQuery(document).ready(function($) {

          $('#banner-fade').bjqs({
            height      : 340,
            width       : 460,
            responsive  : true
          });

        });
      </script>
    </div>


    <script>
    jQuery(function($) {

        $('.secret-source').secretSource({
            includeTag: false
        });

    });
    </script>



<!-- Fim Slide -->





            <div class="row">
                <div class="col-md-12">
                    <div class="product-pagination text-center">
                        <nav>
                          <ul class="pagination">
                          <br>
                            </li>
                          </ul>
                        </nav>                        
                    </div>
                </div>
            </div>
        </div>
    </div>

<p id="paragrafo" style="margin-left:8%; margin-top:-7%;">Todos os Direitos Reservados 2015/2016 - Site desenvolvido por <a href="https://www.linkedin.com/in/gonçalo-tavares-733383118?">Gonçalo Tavares</a></p>
    </div>


    <script src="https://code.jquery.com/jquery.min.js"></script>
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
    <script src="js/owl.carousel.min.js"></script>
    <script src="js/jquery.sticky.js"></script>
    <script src="js/jquery.easing.1.3.min.js"></script>
    <script src="js/main.js"></script>
  </body>
</html>

Part I’m referring to:

<li><a><img style src="admin/<?php echo $array2["img"]; ?>"></a></li>

Thank you

  • Could put the code?

  • The code is too long, it doesn’t fit the question.

  • Gonçalo, it doesn’t have to be all of him, just be one [MCVE].

  • Without the code it becomes more complicated to see your problem.

  • I already put the code.

  • No CSS for this part?

  • Your problem is in the inline css of div inicio slide com margin-top:-20%;

  • The error persists, I think it has to do with something in the while.

  • No, even without while putting the a slide crashes.

Show 4 more comments

1 answer

0

This happens due to its css configuration, you manipulated the margins and you intend to load a large image in relation to the size of your page ! to >solve this you must manipulate the margin attributes or decrease the general size of the >image using Pencil.

Browser other questions tagged

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