Hello,
I am trying to to make link inside a div button that when you mouseover in a div then it will detect the link because of the css property
display:block;width:100%;height:100%;
Using a div it works fine, but I am trying to use it as a span but the display gets misaligned. How can I make the display correct?
Here's the code:
<style>
.link-rounded-button {
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border: 1px solid #828282;
padding:0 0 0 3px;
/* for test purposes, expand the width */
width:200px;
}
.link-block {
display:block;
width:100%;
height:100%;
}
</style>
<div class="link-rounded-button">
<a class="link-block" href="#">this is a link inside a div</a>
</div>
<hr />
<!-- If I make the div to a span, the display is not correct. -->
<span class="link-rounded-button">
<a class="link-block" href="#">this is a link inside a span</a>
</span>
Thanks in advance :)
Kind Regards, Mark