Note that there are some explanatory texts on larger screens.

plurals
  1. POFixed height of table row in html
    primarykey
    data
    text
    <p>I have a table hosted in a div. Neither the table nor the hosting div has a height specified. After the table header row, each subsequent row looks like this:</p> <pre><code>&lt;tr class="movie-info-row"&gt; &lt;td&gt; &lt;div class="movie-cover"&gt; &lt;img class="movie-image" src="" /&gt; &lt;a class="movie-link" href="" target="_blank"&gt;IMDb&lt;/a&gt; &lt;/div&gt; &lt;/td&gt; &lt;td colspan=5&gt; &lt;div class="movie-details"&gt; &lt;p class="movie-file"&gt;&lt;/p&gt; &lt;div class="movie-div-left"&gt; &lt;p class="movie-category"&gt;&lt;/p&gt; &lt;p class="movie-director"&gt;&lt;/p&gt; &lt;p class="movie-insertdate"&gt;&lt;/p&gt; &lt;/div&gt; &lt;div class="movie-description-container"&gt; &lt;p class="movie-description"&gt;&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; </code></pre> <p>I want each table row (except for the header) to have the same fixed height but I just can't get it to work after hours of trying all kinds of approaches (and of course searching on stackoverflow and elsewhere).</p> <p>My css (in less syntax) looks like this:</p> <pre><code>.movie-info-row { height: 240px; p { margin-top: 2px; margin-bottom: 2px; } td { height: 100%; overflow: hidden; } } .movie-cover { border: 1px solid black; width: 130px; height: 100%; overflow: hidden; } .movie-details { border: 1px solid black; height: 100%; overflow: hidden; } .movie-file { font-size:larger; } .movie-div-left { float: left; width: 40%; vertical-align: top; display: inline-block; } .movie-description-container { display: inline-block; float: right; width: 60%; overflow: hidden; vertical-align: top; } .movie-description { overflow: hidden; } </code></pre> <p>As you can see I have fixed the height of the row to 240px and for good measure have each <code>td</code> height set to 100% with overflow hidden. The trouble maker is the description text, which can be quite long and it messes with the table row height. As you can see I have set overflow to hidden in many places (which is probably overkill). Note: This is not browser specific. I am not even using IE. I am testing it with firefox and chrome (both latest versions).</p> <p>I am really at a loss. What am I doing wrong? Any help would be greatly appreciated.</p> <p>ETA: Here's a picture of a table row as it looks now: <a href="https://dl.dropboxusercontent.com/u/27561271/SampleRow.png" rel="nofollow">SampleRow</a></p> <p>As you can see the description text takes the row height with it. I want it limited to a fixed height - basically the hight of the title image. And yes, I want all the information (with more to come) in there. So that is non-negotiable.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload