Images go from horizontal to vertical when placing header or text in table

0

The problem is that I have arranged the images horizontally, they find a hover, everything is perfect. But at the moment of trying to add a text to it under either p or span or h etc. or among others that I tried, my images are left in a vertical position, the truth does not happen but at the moment of inserting a title or heading underneath, they go from horizontal to vertical. Help please

<table>
</tr>
</thead>
<tr>
<a href="" class="mainmenu" /><img title="Overlord" src="https://lh3.googleusercontent.com/-wmXOMSvGdqE/W1olljMPl8I/AAAAAAAAASE/zcrXBcEDR5Q72zGVf24_41unNrU-fE7DACEwYBhgL/w140-h87-p/HALF_LIFE_3_WALLPAPERS_IN_HD.jpg"  alt="" HSPACE="20"></a>
</tr>
<tr>
<a href="" class="mainmenu" /><img title="Overlord" src="https://lh3.googleusercontent.com/-wmXOMSvGdqE/W1olljMPl8I/AAAAAAAAASE/zcrXBcEDR5Q72zGVf24_41unNrU-fE7DACEwYBhgL/w140-h87-p/HALF_LIFE_3_WALLPAPERS_IN_HD.jpg"  alt="" HSPACE="20"></a>
</tr>
</tr>
</table>
    
asked by Taida 28.07.2018 в 16:59
source

1 answer

0

You have several errors in the syntax, first you are closing the label <a> twice, this label is not selfclosing therefore it should not be closed when <a /> is declared. Second, the structure of the table must have rows and columns, the rows are joined horizontally because the child element has a display: inline , but in reality you have to put column labels <td> . In conclusion there should be something like that.

<table>
<tr>
<td>
<a href="" class="mainmenu">
<img title="Overlord" src="https://lh3.googleusercontent.com/-wmXOMSvGdqE/W1olljMPl8I/AAAAAAAAASE/zcrXBcEDR5Q72zGVf24_41unNrU-fE7DACEwYBhgL/w140-h87-p/HALF_LIFE_3_WALLPAPERS_IN_HD.jpg"  alt="" HSPACE="20">
</a>
<p>
LOL
</p>
</td>
<td>
<a href="" class="mainmenu"><img title="Overlord" src="https://lh3.googleusercontent.com/-wmXOMSvGdqE/W1olljMPl8I/AAAAAAAAASE/zcrXBcEDR5Q72zGVf24_41unNrU-fE7DACEwYBhgL/w140-h87-p/HALF_LIFE_3_WALLPAPERS_IN_HD.jpg"  alt="" HSPACE="20"></a>
<p>
LOL
</p>
</td>
</tr>
</table>
    
answered by 28.07.2018 / 17:46
source