13 Answers
New AnswerColleagues, 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!
3/4/2021 10:26:14 PM
Роман Рубцов13 Answers
New AnswerWithout 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 .
Роман Рубцов 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">
<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?
Thank you, guis! Your help is invaluable! I corrected mistake and used “big value”. Now everything works just as it should!
Thanks! I know it. Theese characters “ “ I’ve used just for writing message. In my code correct ones. The qwestion remains. Need your help!
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message