I am developing a webpage and I used HTML5 to make the entire div tag a tag. Before adding a link, the entire div will expand when I hover over it. Suddenly it only works if I hover over words and not at the box that I created. HTML looks like this (minus the actual link):
<a href="link goes here" style="text-decoration: none;"> <div class="home-tab"> home </div> </a>
And the CSS to guide it looks something like this:
.home-tab:hover { width: 150px; height: 45px; margin-top: 30px; border-top-left-radius: 15px; border-top-right-radius: 15px; font-family: arial; color: #FFFFFF; text-align: center; font-size: 13pt; padding-top: 25px; }
(Note: this is not all the code in the stylesheet. I also have a beautiful color there.)
Is there something that I am missing in my CSS so that it all works on hovering, not just in words? I donβt even know what questions to ask to find out what I did here.
ETA: I tested this on three different browsers. It has the same issue for IE, Firefox, and Chrome.
ETA: CSS without attribute: hover.
.home-tab{ width: 150px; height: 35px; margin-top: 40px; border-top-left-radius: 15px; border-top-right-radius: 15px; font-family: arial; color: #FFFFFF; text-align: center; font-size: 13pt; padding-top: 25px; }
ETA: Okay, there is something very strange here. It seems that any elements in the far right state do not have this problem. Seriously, the forums tab and the next button in the right corner both have: hover elements and they work exactly the way I want.
source share