Is it possible to make hyperlink looked like button WITH text on it?
We can make hyperlink button with code:
<a href="..."> <img src="button.png" width="100" height="50" alt="Some text"></img> </a>
but i need also TEXT in the center of button.
Thanks.
I'd suggest, without knowing exactly what you want, and assuming the following mark-up:
<a href="#"><img src="path/to/image.png" /><span>Some text</span></a>
a {
position: relative;
display: inline-block;
}
a span {
position: absolute;
top: 50%;
left: 50%;
margin-top: -1em;
margin-left: -50%;
width: 100%;
height: 2em;
color: #f90;
background-color: rgba(0,0,0,0.5);
}
JS Fiddle demo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With