0
Hello I have a problem that does not leave me alone, I need that when these cells of the table arrive in 4 in each row it jumps to the next one, but here’s the problem I’m pulling these cells from the database using the $data["descricao_map"]; I do not know what to do.
<?php
include("ArquivoConexão.php");
$consulta = "SELECT * FROM materialapoio";
$con = $mysqli->query($consulta) or die($mysqli->error);
?>
<!doctype html>
<html>
<head>
<link rel="shortcut icon" href="../IMAGENS/Favicon.png" />
<link rel="icon" href="../IMAGENS/Favicon.png" type="../image/x-icon" />
<meta content="IE=edge"http-equiv="X-UA-Compatible" charset="utf-8">
<title>Kep</title>
<link href=../CSS/Estilo_02.css rel=stylesheet>
<script type="text/javascript" src="../JS/JS_02.js"></script>
</head>
<body class=Modelo01>
<div class=PaginaCompleta>
<div id=MenuTotal class="Div_Menu_Oculto PositionAb" style="width: 5%">
<input type="checkbox" id="navicon" onclick="Aumentar('MenuTotal') & Diminuir('Conteudo') & Aparecer('Menu') & Aparecer('Logo')"/>
<div class="nav-toggle">
<label for="navicon" class="menu">
<span></span>
<span></span>
<span></span>
</label>
</div>
<img id=Logo class="PositionRe LogoCompleto"src=../IMAGENS/LogoTCC.png style="display: none">
<div id=Menu class="PositionAb BotoesMenu" style="display: none">
<input type=button class="BotaoMenu PositionRe FonteArial" value="MATERIAL DE APOIO" onclick="MaterialDeApoio()">
<input type=button class="BotaoMenu BotaoMenu2 PositionRe FonteArial" value="CALENDÁRIO" onclick="Home()">
<input type=button class="BotaoMenu BotaoMenu3 PositionRe FonteArial" value="LISTA DE TAREFAS" onclick="ListaDeTarefa()">
</div>
</div>
<div class="Div_Conteudo Con_Maior PositionAb" id=Conteudo style="width: 95%">
<div class="Div_Cabeçalho PositionRe">
<div class="PositionRe BotoesCabeçalho BT_Menor">
<input type=button class="PositionRe IconesCabeçalho iconeHome" onclick="Home()">
<input type=button class="PositionRe IconesCabeçalho Home" onclick="Sair()">
</div>
</div>
<div class="BlocoDasListas PositionRe">
<div class="FonteArial TituloTarefas PositionRe">Material de apoio</div>
<div class=BlocoMaterial>
<table class="FonteArial FormataçãoMateriais">
<tr class="LinhaMaterial1">
<?php while($dado = $con->fetch_array()){ ?>
<td class="Colunas01"><?php echo $dado["descricao_map"];?></td>
<?php }?>
</tr>
</table>
</div>
</div>
</div>
</div>
</body>
</html>
Look if this solves https://answall.com/questions/324963/como-coloca-um-limite-de-4-imagens-por-linha/324976#324976 Vc need to structure your HTML to break this way, after vc populate with what comes from the bank and there will break correctly according to how the CSS made to receive the content
– hugocsl
I’m sorry to say something a little out of the question, but... why don’t you use Bootstrap? There you already have the grid ready. It’s always 12. Then you can put
col-md-3
, that will fit 4.– Fusseldieb
It is good practice to mark a response that has met your acceptance, see https://i.stack.Imgur.com/evLUR.png and because https://pt.meta.stackoverflow.com/questions/1078/como-e-por-que-aceitar-uma-resposta/1079#1079
– user60252