I'm trying to setup a table on an HTML page that keeps column 1 & 3 the same width.
The table itself is set to 100% width and column 2 has a fixed pixel width.
The page is for reference instructions and we're trying to keep everything reactive all the way down to mobile.
Currently I have the table columns set to 45% / 10% / 45% and it 'works' but the column width skews when i add things to column 3; I'd like column 1 & 3 to always remain equal in width even if i resize the window. I believe I'll need javascript for this but am not sure
Question
Brandon H Supervisor
Hello
I'm trying to setup a table on an HTML page that keeps column 1 & 3 the same width.
The table itself is set to 100% width and column 2 has a fixed pixel width.
The page is for reference instructions and we're trying to keep everything reactive all the way down to mobile.
Currently I have the table columns set to 45% / 10% / 45% and it 'works' but the column width skews when i add things to column 3; I'd like column 1 & 3 to always remain equal in width even if i resize the window. I believe I'll need javascript for this but am not sure
does anyone have any advise?
here's a couple screenshots to show what I mean:
with items in 3rd column:
basic table code:
Link to comment
https://www.neowin.net/forum/topic/1370292-htmlcssjs-help-setting-up-3-column-centered-table/Share on other sites
11 answers to this question
Recommended Posts