2
I have 2 rectangles on the screen that serve for data to be displayed inside them.
But when you have a lot of information, the data exceeds its size. I want to make sure that the data does not exceed it and when passing the mouse over the information is shown completely. Each rectangle is a link that redirects to another page.
function Atualizar() {
window.location.reload();
}
#tudo {
margin: 50px 0px 0px 23px;
}
.position_box {
position: relative;
width: 30.5%;
height: 160px;
background-color: #D9D9F3;
float: left;
margin-left: 20px;
margin-bottom: 20px;
}
.estilo:hover {
-webkit-transform: scale(1.15);
-ms-transform: scale(1.15);
transform: scale(1.15);
-webkit-transition: 0.5s;
z-index: 1; /*Faz o elemento ficar a cima dos outros*/
}
a:link, a:visited, a:active {
text-decoration: none;
color: #000;
}
.titulo {
text-align: center;
font-weight: bold;
font-size: 14px;
}
.estilo_tab {
padding-right: -30px;
width: -60%;
border-color: #000;
}
table td {
font-size: 14.8px; /*Tamanho fonte resultados*/
font-weight: bold;
}
table tr {
font-size: 10.5px;
}
<!--Primeira Linha de Box's-->
<body onload="setTimeout('Atualizar()',300000)">
<!--Chamando a função 'Atualizar()' e configurando um tempo de 5 minutos-->
<div id="tudo">
<a href="#">
<div class="position_box estilo">
<span class="titulo">
<p>Itens por Célula</p>
</span>
<table border="1">
<tr>
<td>Info</td>
<td>Info</td>
<td>Info</td>
<td>Info</td>
<td>Info</td>
<td>Info</td>
<td>Info</td>
<td>Info</td>
<td>Info</td>
</tr>
<tr>
<td>Info</td>
<td>Info</td>
<td>Info</td>
<td>Info</td>
<td>Info</td>
<td>Info</td>
<td>Info</td>
<td>Info</td>
<td>Info</td>
</tr>
</table>
</div>
</a>
<a href="#">
<div class="position_box estilo">
<span class="titulo">
<p>Valor Estoque (WM)</p>
</span>
<table border="1">
<tr>
<td>Info</td>
<td>Info</td>
<td>Info</td>
</tr>
<tr>
<td>Info</td>
<td>Info</td>
<td>Info</td>
</tr>
</table>
</div>
</a>
</div>
</body>
See that you are placing an extensive table for the size of the square. Unless you create a
scroll
horizontal in the box, with the table of this size,.– Jorge.M
Thanks @Jorgematheus How do I create a horizontal scroll?
– Guilherme Wayne
Puts
overflow: auto;
in the class . position_box and see if it resolves. if it’s not what you need to comment there– hugocsl
You can prevent the table from exceeding the div size by using
table-layout: fixed
, and so that the text does not exceed the size of the td,overflow: hidden
.– Ricardo Pontual