I'm having trouble displaying movie information on a website due to CSS and HTML issues. My goal is to align the title (Director:, Cast:, etc) with the first item in the list, and have all subsequent items follow below. I initially tried using a definition list but struggled with making it responsive using CSS. Currently, I am using a table, but I am starting to think a regular list might be more suitable.
Here is my sample code. It looks how I want it to when the window is wide enough, but breaks when viewed on mobile devices (specifically, the Cast: columns should become one column).
Any assistance would be greatly appreciated as I have been working on this for several months now.
Below is my HTML:
<div class="movieinfo">
<table>
<tr class="spaceUnder">
<td class="workheader">Director:</td>
<td>John Carney</td>
</tr>
<tr class="spaceUnder">
<td class="workheader">Writer:</td>
<td>John Carney</td>
</tr>
<tr>
<td class="workheader">Cast:</td>
<td>Keira Knightly</td>
<td class="spacedRight">James Corden</td>
</tr>
<tr>
<td></td>
<td>Mark Ruffalo</td>
<td class="spacedRight">CeeLo Green</td>
</tr>
<tr>
<td></td>
<td>Hailee Steinfeld</td>
<td class="spacedRight">Catherine Keener</td>
</tr>
<td></td>
<td>Adam Levine</td>
</table>
</div>
Furthermore, here is my CSS:
.movieinfo {
color: #333333;
font-size: 24px;
line-height: 1.1;
font-weight: 300;
padding: 20px;
background-color: rgba(255,255,255,.7);
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
margin-bottom: 20px;
}