1
I have a div that has these characteristics:
div#circulo{
height:200px
width:200px
background-image: url(minhaimagem.png);
background-size:200px;
}
The image that this is is a centralized circle, with the transparent background. So in my html I put for the div be a link, this way:
<a href="proximapagina.html"><div id=circulo>...conteudo...</div></a>
Only the clickable area was, as expected, in the whole square of the image. It has to make the clickable area only the internal circle??
Could only a display: block; solve?
– taiar
@taiar, the display: inline-block; it was just to adjust the size of the link to its content, but if the author prefers, he can put a display: block, and set the size in the link itself, instead of in the content, as in this example
– Samir Braga
Hello, I used the border-Radius as you said and it worked, (in part) because now there are some areas of my page that have become like a random "clickable area" without being there. How to solve?
– Nicolas S.
@Nicolasschinestzki, you applied the style directly on the dial to
a
, if it was, it should apply to something more restricted, like a class, otherwise the styles will go to all links. Otherwise, it may be more specific?– Samir Braga
I just saw that the error was totally senseless.. But the border-Radius worked even! Thanks
– Nicolas S.