0
Good afternoon, I’m having a question here in the form mounting using and varied.
i have the following table:
<table>
<tr>
<td>Nome:</td>
<td>Senha:</td>
</tr>
<tr>
<td>Código</td>
<td>E-mail</td>
</tr>
<tr>
<td class="campo-grande">Número de RAPSI:</td>
</tr>
and the CSS:
table{
margin:0;
padding:0;
}
tr{
display:block;
border:1px solid black;
margin-top:5px;
}
td{
display:inline-block;
border:1px solid black;
width:200px;
}
.campo-grande{
width:400px;
}
What happens is that the field "RAPSI number" does not get 400px width, anyone knows what it is? I do not have much experience with tables, if help follows the codepen
@bfavaretto, without wanting to deviate the scope of the question, one could say why it did not work the way that haykou did?
– Cold
Because
display: inline-block
suffers interference from whitespace, like HTML line breaks and indentation. @Cold– bfavaretto
Okay, just ask why I’ve been here trying (even without
display: inline-block
) and I couldn’t. I must have missed something... Thanks @bfavaretto– Cold
@Cold Look how it looks without the blanks: http://codepen.io/anon/pen/LiGwJ The difference in the size of the last line is due to the 2px extra edge on the top lines (because they have 2 cells each).
– bfavaretto
Very enlightened... vlw
– Cold