I want the layout of my page to look like this:
Heading | video
text text text | video
video | Heading
video | text text text
Heading | video
text text text | video
The videos are all the same size, and should not take up fully half of the table row. However, naively using a <table>
, the cells were split evenly down the middle:
How can I get the cells containing video to shrink so that the text is a wide as possible? Not that this means the column seperators will not be aligned between rows, though they should be aligned between every two rows. Again, the videos are all the same size. I apologize if this is a n00b question, I have no web dev experience. Here's the code I used:
<table cellspacing="50">
<tr>
<td valign="top" >
<h2>Heading 1</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</td>
<td>
<video autoplay loop>
<source src="video/video1.mp4" type="video/mp4">
</video>
</td>
</tr>
<tr>
<td>
<video autoplay loop>
<source src="video/video2.mp4" type="video/mp4">
</video>
</td>
<td>
<h2>Heading 2</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</td>
</tr>
</table>