0

How can I adjust table size to window/page size?

I need to create something like excel sheet using html and javascript.I need my table size to be the same size as window size.

10th Jul 2017, 6:39 PM
Manik Tafralian
Manik Tafralian - avatar
7 Antworten
+ 3
table { width:100%; } ... will set all <table> elements the whole width of each one parent ;) ... or specify width of first row cells, abd use 'table-layout:fixed;' in the <table> css definition ^^
10th Jul 2017, 7:19 PM
visph
visph - avatar
+ 2
You will not be able to style anything in Html5 without Css... all that you can do with Html alone, is to declare an older <!doctype> (Html4 would be enough) for use old styling capacities actually deprecated :P
10th Jul 2017, 7:49 PM
visph
visph - avatar
+ 2
In Html4 and previous yes, but this attribute is deprecated in Html5, even if permissivity of Html make browsers trying to auto-correct non valid Html, you cannot be sure that will be correctly corrected in future ;)
10th Jul 2017, 7:55 PM
visph
visph - avatar
+ 1
you could write an inline css <table style="width: 100%; height: 100%;"></table>
10th Jul 2017, 8:17 PM
Andrés04_ve
Andrés04_ve - avatar
+ 1
Many thanks to both of you )))
10th Jul 2017, 8:32 PM
Manik Tafralian
Manik Tafralian - avatar
0
Thank you,but I need to use html only not css
10th Jul 2017, 7:46 PM
Manik Tafralian
Manik Tafralian - avatar
0
It's just I am not familiar with CSS.Does <table width=100℅> do the same thing as the method you mentioned above ?
10th Jul 2017, 7:52 PM
Manik Tafralian
Manik Tafralian - avatar