Search code examples
htmlhtml-tablevalign

Moving text up in a table


I currently have a table that looks like this: http://s8.postimg.org/gybzti0rn/Screen_Shot_2015_02_27_at_1_30_23_PM.png

I want to move the description of the boat up to the top of the image. I tried using valign="top", but this moved the description to the very top of the table, where the boat name is.

Here is my HTML:

<table border ="1">
<tr>
    <th> Boat Name </th>
  <th rowspan="2">Description</th>
  </tr>
  <tr>
    <td><img src="boatimage.png"></td>
  </tr>      
</table>

Thanks in advance for the help!


Solution

  • Can you make the question a bit clearer?

    Maybe try CSS

    <th style="display:block;position:relative;top:20px;" rowspan="2">
    

    That will move it 20px from the top of it's cell