html - CSS: How to get two DIVs side by side with automatic height, to the height of their container? -
I am preparing a website for a customer, and I have two side-by-side I am attempting to get the DIV% of the container I have been side-by-side, but I have been left in the same height as the correct DIV.
You can see the problem here:
"Challenges" and "Benefits" should be manually side-by-side and the same height without specifying the height of the DIV . how can I do this?
Your problem is that the external device is automatically shaping by internal content,
You have a few options:
- Use the background solution mentioned in @ R0MANARMY, whose answer is equal to two lengths. Columns
- Set the height of the two internal devices as the exact number (using PX or M)
- Set the height of the external device to the correct number. Play
- with
display
attribute and try different values like table-cell. Keep in mind that it is not supposed to work in some older browsers. - Use a simple table with one line and two columns.
I know that the last one is the most controversial of all, yet it is a possible solution to your problem and there is no reason why you should not have the least assessment.
(Please [sigh] please, please do not mention the word "semantic HTML"! There is no such thing in our universe.)
Comments
Post a Comment