Page loses styles by adding "1" in PHP

0

I have a problem wanting to add "1" to a variable in PHP, it distorts CSS styles on my page.

I explain, the normal page looks like this:

But when I add "1" it goes like this:

The PHP code is as follows:

<?php
//Crear Variables para conexion Noticias Principales
$host = "localhost";
$user = "kautivai_EditorDeNoticias";
$pw = "0927410654marvin";
$dataBase1 = "kautivai_DatosDeNoticias";

$conexion = mysqli_connect($host, $user, $pw, $dataBase1) or die("Problemas al conectar con base de datos 'kautivai_DatosDeNoticias'");

$obtener_filas = mysqli_query($conexion, "SELECT * FROM Noticia1");
$numero_de_fila = mysqli_num_rows($obtener_filas); //Debo sumar "1" para obtener la ultima fila.. asi: $numero_de_fila = mysqli_num_rows($obtener_filas) + 1;
mysqli_set_charset($conexion, "utf8");
ini_set("default_charset", "UTF-8");
mb_internal_encoding("UTF-8");

    // Ejecutas las consulta 
    $result = mysqli_query($conexion, "SELECT * FROM Noticia1 WHERE ID = '$numero_de_fila'") or die("Error al realizar consulta: ".mysqli_error($conexion));

    while($final = mysqli_fetch_array($result)){ 
?>

<div id="contenedorHeader">
<header>
    <div id="centrado">
        <a href="index.html"><img src="imagenes/kautivaLogo.jpg" id="logo2"></a>
        <img src="imagenes/menu.png" id="menuIcon">
        <ul>
            <a><li>INICIO</li></a>
            <a href="deportes.html"><li>DEPORTES</li></a>
            <a href="edicion.html"><li>VIDEOS</li></a>
            <a href="noticia.php"><li>VIRALES</li></a>
            <a href="contacto.html"><li>CONTACTO</li></a>
        </ul>
    </div>
</header>
</div>

        <ul id="menu2">
            <a href="index.html"><li>INICIO</li></a>
            <a href="#"><li>DEPORTES</li></a>
            <a href="#"><li>VIDEOS</li></a>
            <a href="noticia.html"><li>VIRALES</li></a>
            <a href="contacto.php"><li>CONTACTO</li></a>
        </ul>

        <div id="CajaRedesPC">
            <a href="https://www.facebook.com/KautivaOficial/"><div class="redesBox"><img src="imagenes/fdefacebook.png" class="redes"></div></a>
            <a><div class="redesBox"><img src="imagenes/birdTwitter.png" class="redes"></div></a>
            <a><div class="redesBox"><img src="imagenes/google.png" class="redes"></div></a>
            <a><div class="redesBox"><img src="imagenes/linkedin.png" class="redes"></div></a>
            <a><div class="redesBox"><img src="imagenes/pinterest.png" class="redes"></div></a>
        </div>

<div id="general" >
    <h1 class="indicadores">Destacados de hoy</h1>

    <hr class="barrasHorizontales" size="3px" color="#1A354C" width="100%" noshade="noshade" style="margin-top: 0; margin-bottom: 10px; opacity: 1;">

    <!--================================================ Bloque Principal ===============================================-->
    <section id="general2">
        <article id="articleIzquierdo">
            <div id="NOTBIG1">
                <div id="fotoB1"><? echo '<img src="'.$final['RutaImagen'].'" class="PORTADAS1">'; ?></div>

                <h3 id="Etiqueta1" style="color: #20a2e3; font-family: 'Raleway', sans-serif; font-size: 12px; line-height: 10px; margin-top: 10px; margin-bottom: 10px;"><?php echo $final['Etiqueta']; ?></h3>

                <hr size="1px" width="100%" noshade="noshade" style="margin: 10px auto; opacity: 0.3;">

                <h1 class="titulosMain" id="Titulo1"><?php echo $final['Titulo']; ?></h1>
                <h1 class="Subtitulos" id="Subtitulo1"><?php echo $final['Subtitulo']; ?></h1>
                <p style="color: #2E2E2E; font-weight: lighter; font-family: Arial; font-size: 11px; margin-top: 10px;">Por: <span style="color: #1279a8;"><?php echo $final['Autor']; ?> <span style="color: #2E2E2E;">|</span></span>&nbsp;<span><?php echo $final['Fecha']; ?></span></p>
                <p class="resumenTitulos"><?php echo $final['Texto']; ?></p>
            </div>
<?php
    }//Cierre de while
?>

</body>
</html>
    
asked by Marvin Morales 20.11.2017 в 01:19
source

0 answers