I have a table inside a DIV , but the div height and width don’t expanded automatically when the Table(:edited:) height and width are increased
I have a table inside a DIV , but the div height and width
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
<td><div/></td>DIV’s width should stretch the full width of the TD, minus TD’s padding and DIV’s margin (if any). However, DIV will never grow taller than its content, regardless of placement – you have to set its height. You should be able to set DIV’s height to match TD’s height, whether you use JS or whether that’s rendered by server.
BTW, unless you’re targeting some special height, the TD will grow in height as DIV grows, and DIV will start growing vertically as its content (assuming text) is longer than DIV’s preset width (in your case, TD’s width).