Answer the question
In order to leave comments, you need to log in
What is the width in % of td measured from?
Code .
these are 5 examples, but they are all about one thing (subject).
Answer the question
In order to leave comments, you need to log in
All tables are by default in%, and the width of the cell changes from the content, well, when it becomes too much, for example, more than the width of the parent in which the table lies, the cell will no longer shrink)
I hope I answered your question.
PS You can easily check with a sign where there are 6-8 columns, and the information is not short, and immediately everything will become clear
By the way, from this situation, you can take a couple of interesting things:
1. If you take 2 cells in one set 1% width, then build a table with a width of the contents of this cell multiplied by 100.
For example. If you take some content in the first cell, and it is, for example. get 83px, then the table width will be 8300px: the 1st cell will be 83px wide, and the second will take the rest of the width up to 8300.
jsfiddle.net/4rcqgj0L/2
2. If you take 2 cells and set 100% in one, then a table with a width greater than 1/3 million pixels (depending on the 2nd cell) :)
First, in turn, you can add content and this will not affect the width, but the 2nd cell affects the total width of the table (the total width can reach over a million pixels.
jsfiddle.net/4rcqgj0L/3
And in a container, you can use this
jsfiddle.net/4rcqgj0L/4
eg. for adaptive layout.
And there is something similar in bootstrap:
getbootstrap.com/components/#input-groups-buttons
see how input-groups and everything in them are laid out.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question