0
the width attribute does not work in the table, why?
https://code.sololearn.com/WBg8zL0hvW3Q/?ref=app the "height" attribute is applied to the "<th>" tag and the "width" attribute is not present why?
7 ответов
+ 7
In <table> context, use 'min-width' instead 'width' to force size (default behaviour try to not overflow available space and limit table width to available space -- instead you could set the explicit width required by the <table> element once added all borders, border-spacing and cell widths ^^)
+ 6
@Lord Krishna:
'width' property is supported, but should only be respected if available width is enough ;P
+ 5
Sure it works, else I would not have posted that ;P
+ 2
use css codings.
+ 1
th{
height:50px;
width:100px; /*why does not it work ?*/
border-style:solid;
border-width:1px;
}
0
thanks
0
th{
height:50px;
min-width:50px;
border-style:solid;
border-width:1px;
}
this works 😁