Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 2
HTML. Setting width and height of the table.
Colleagues, how can I set width and height of each cell of the table? Iāve tried different ways: 1. <table width=ā20ā> <tr> <td>text</td> <td>text</td> <td>text</td> </tr> </table> and 2. <table> <tr width=ā20ā> <td>text</td> <td>text</td> <td>text</td> </tr> </table> 3. <table> <tr> <td width=ā20ā>text</td> <td>text</td> <td>text</td> </tr> </table> But this argument (width=ā...ā) doesnāt work. Other arguments (bgcolor, href) work correctly. I havenāt find any information in forum. Please help!
13 Respostas
+ 4
Š Š¾Š¼Š°Š½ Š ŃŠ±ŃŠ¾Š² using width="20" Works fine , 20 is 20px . try something like % or 200
+ 3
did you try this one?
<table style="width:100%"></table>
+ 3
Without any unit "20" is considered as 20px , and 20 px is a lot less to see any effect , so try using a big value or % of parent width .
+ 3
Š Š¾Š¼Š°Š½ Š ŃŠ±ŃŠ¾Š² In your table tag you misspelled width as widft
Try this and you will see a change (only change this line then look at result)
<table style="width:100%" align="center" border="2">
+ 2
characters ā ā don't work , use these double quotes , " "
+ 2
<table style="widfh:20%" align="center" border="2">
<tr style="width:20px">
<td bgcolor="green">ŠŠµŃŠ²ŃŠ¹</td>
<td bgcolor="yellow">ŠŃŠ¾ŃŠ¾Š¹</td>
<td bgcolor="turquoise">Š¢ŃŠµŃŠøŠ¹</td>
</tr>
<tr>
<td> <a href="https://www.sololearn.com/Course/HTML/?ref=app">HTML</a></td>
<td> <a href="https://www.sololearn.com/Course/CSS/?ref=app">CSS</a></td>
<td> <a href="https://www.sololearn.com/Course/JavaScript/?ref=app">JavaScript</a></td>
</tr>
</table>
It doesn,t work still. All the other arguments work but neither (width) nor (style) work.
Colleags, have you any other ideas - whatās wrong with them?
+ 2
Thank you, guis!
Your help is invaluable!
I corrected mistake and used ābig valueā. Now everything works just as it should!
+ 2
"Guysā - of course. I should to make my English better too. ))
+ 1
Thanks! I know it. Theese characters ā ā Iāve used just for writing message. In my code correct ones.
The qwestion remains.
Need your help!
+ 1
Mohammad Alomary, I havenāt tried to use this argument. Thanks for information!
+ 1
You'r welcome
but did it work??
+ 1
Abhay, Iāve tried %, but not āpxā. Iāll use advice.
Thank you!
+ 1
Use % after the value