I am trying to make a menu bar for my website, I’ve got an image for the bar itself and the text should go ontop of it… All of this lives inside a table. This is what I have right now:
<tr>
<td>
<img src="images/index2_04.jpg" width="667" height="33" alt="">
<div style="position:absolute; left:50%; top:22%;">
<h1><a href="/index.html">Home</a> <a href="/more.html">More </a><a href="/help.html">Help</a></h1>
<div>
</td>
</tr>
As you can see I’ve been trying to link the image and text with percentages, but despite the fact that the distance should stay the same relative to the image, the text alters and moves when tested on different devices. Is there a better way of doing this? Or am I doing something wrong?
Thanks in advance 😉
What you want to do is set the image as a background on the DIV.
You can do that like this: