Positioning a FORM on the page

-1

I'm trying to put two SELECT MENU side by side on my page. However, when I put the first one it appears, when I place the second and it appears in the changed position. If I reverse and put the second first it disappears in the browser view.

<style>
article.form {
  margin: 15px;
  padding:15px;
  border: 1px #90ac6e solid;
  border-radius: 6px;
  -webkit-box-shadow: 1px 1px 3px #000;
  -moz-box-shadow: 1px 1px 3px #000;
  box-shadow: 1px 1px 3px #000;
  background: #ffffff;
  width: 600px;
  transition: background-color .4s, border-color .4s;
  float: left;
}
</style>

<?php

    if($centraliz = "S"){


?>

    <article class="form">
    <h3>Titulo</h3>
    <form id="frmCad" name="frmCad" method="post" action="../inc/processa.php?modo=incluir&fnc=<?php echo $fnc; ?>&ans=<?php echo $linha; ?>">
    <p>
        <input name="emp" type="hidden" value="<?php echo $lj; ?>" />
        <input name="projeto" type="hidden" value="Budget" />
        <input name="exercicio" type="hidden" value="<?php echo $basebud; ?>" />
        <input name="linhabud" type="hidden" value="<?php echo $linha; ?>" />
        <input name="usuario" type="hidden" value="<?php echo $usuario; ?>" />      

            <div><label for="nome">Anterior: </label>
<?php

include("../libraries/anterior.php");
?>  

        <fieldset style="padding:8px; margin:15px 0px 25px 0px;">
            <form method="get" name="tBand" id="cBand" style="float:left;margin-top:0px;">
            <select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
                <option value="">Selecione a Bandeira</option>
<?php
      $qry="SELECT sjy_empresas.bandeira AS id_bandeira, sjy_bandeira.bandeira
            FROM kcb_tbstates 
            INNER JOIN sjy_bandeira 
            INNER JOIN sjy_grupo 
            INNER JOIN sjy_empresas ON sjy_grupo.id_grupo = sjy_empresas.grupo
            AND sjy_bandeira.id_bandeira = sjy_empresas.bandeira
            AND kcb_tbstates.ID = sjy_empresas.estado
            WHERE sjy_empresas.grupo = '$grupo'
            GROUP BY sjy_empresas.bandeira, sjy_bandeira.bandeira";
      // Executa a consulta OU mostra uma mensagem de erro
      $rs = $MySQLi->query($qry) OR trigger_error($MySQLi->error, E_USER_ERROR);

      // Faz um loop, passando por todos os resultados encontrados              
      while ($dt = $rs->fetch_object()) {
            $band       = $dt->id_bandeira;
            $bandeira   = $dt->bandeira;

            echo "<option value='preorc.php&fnc=". $fnc . "&and=" . $linha . "&bandorc=" . $band . "'>" . $bandeira . "</option>";
    }
?>  
            </select>
        </form>
        <form method="get" name="tLoja" id="cLoja" style="float:left; padding-left:15px;margin-top:0px;">
            <select name="menu2" onChange="MM_jumpMenu('parent',this,0)">
                <option value="">Selecione a loja</option>
            <?php   
    $qry="SELECT sjy_empresas.id_empresa, sjy_empresas.nick, sjy_empresas.bandeira AS band, sjy_bandeira.bandeira
            FROM sjy_bandeira 
            INNER JOIN sjy_empresas ON sjy_bandeira.id_bandeira = sjy_empresas.bandeira
            WHERE sjy_empresas.grupo = $grupo
            AND id_bandeira = $bandorc";
      // Executa a consulta OU mostra uma mensagem de erro
      $rs = $MySQLi->query($qry) OR trigger_error($MySQLi->error, E_USER_ERROR);

      // Faz um loop, passando por todos os resultados encontrados              
      while ($dt = $rs->fetch_object()) {
            $band       = $dt->band;
            $bandeira   = $dt->bandeira;
            $nick       = $dt->nick;
            $emp        = $dt->id_empresa;
            echo    "<option value='premorc.php&fnc=". $fnc . "&ans=" . $linha . "&emp=" . $lj . "'>" . $nick . "</option>";
            }

            ?>

            </select>
        </form>

            </fieldset>


<?php
} else {   // Se a gestão do setor não é centralizada

echo "Outro código";}
    
asked by anonymous 24.10.2017 / 08:26

1 answer

0

In this case, I recommend applying a class to the first element, and editing it with CSS with float: left.

article.form {
  margin: 15px;
  padding:15px;
  border: 1px #90ac6e solid;
  border-radius: 6px;
  -webkit-box-shadow: 1px 1px 3px #000;
  -moz-box-shadow: 1px 1px 3px #000;
  box-shadow: 1px 1px 3px #000;
  background: #ffffff;
  width: 500px;
  transition: background-color .4s, border-color .4s;
  float: left;
}
.left{
float: left;
}
<article class="form">
    <h3>Titulo</h3>
    <form id="frmCad" name="frmCad" method="post" action="../inc/processa.php?modo=incluir&fnc=<?php echo $fnc; ?>&ans=<?php echo $linha; ?>">
    <p>
        <input name="emp" type="hidden" value="<?php echo $lj; ?>" />
        <input name="projeto" type="hidden" value="Budget" />
        <input name="exercicio" type="hidden" value="<?php echo $basebud; ?>" />
        <input name="linhabud" type="hidden" value="<?php echo $linha; ?>" />
        <input name="usuario" type="hidden" value="<?php echo $usuario; ?>" />      

            <div><label for="nome">Anterior: </label>

        <fieldset style="padding:8px; margin:15px 0px 25px 0px;">
            <form method="get" name="tBand" id="cBand" style="float:left;margin-top:0px;">
            <select name="menu1" onChange="MM_jumpMenu('parent',this,0)" class='left'>
                <option value="">Selecione a Bandeira</option>
        </select>
        </form>
        <form method="get" name="tLoja" id="cLoja" style="float:left; padding-left:15px;margin-top:0px;">
            <select name="menu2" onChange="MM_jumpMenu('parent',this,0)">
                <option value="">Selecione a loja</option>
               </select>
    
24.10.2017 / 23:28