How to turn a whole table cell into a link in HTML/CSS? -
i read lot of questions problem, none of solve problem perfectly: cell won't clickable in it's full height.

as shown in picture, made headline webpage using <table> tag , colored clickable content blue, while whole table colored orange.
the html code is:
<table class="visible" id="menu" align="center"> <tr> <td><a href="#"><p>home</p></a></td> ... </tr> </table> and css cose is:
#menu { display: block; text-decoration: none; } unfortunately see, not whole cell blue, therefore not whole cell clickable. tell me perfect solution (possibly without using javascript)?
try display: flex , justify-content: center instead of display: block.
a { background: lightblue; display: flex; justify-content: center; text-decoration: none; } <table align="center" border="1"> <tr> <td><a href="#"><p>home</p></a></td> </tr> </table>
Comments
Post a Comment