I have created some rounded navigation tabs using CSS and am having trouble when implementingn hover
.
Firstly here is a link to the site Tabs as it is quite difficult to explain. Please, hover over the left side of the tabs to understand my problem. I have explained below.
I have a background image set on #navigation li
items this contains the left side corner and I then have a second background image (the right corner) this is set using #navigation a
.
However when I hover over the left side of the tab, only a small piece of background is shown, I presume this is because only the li area is being hovered over. Obviously I would like the entire tab to highlight as it does when you hover over the rest of it.
This was quite hard to explain so if you need to question me further to understand the problem please do.
Couple of things:
Fix the problem by taking the padding off the <li> and putting it back on the child <a> - the space they occupy needs to be the same to get the hovers to align.
Now you have a different problem, the left corner doesn't show. Fix this by making the background colour for the a
and a:hover
equal to transparent
instead of the colours - now the <li> can show through.
Finally, I suggest you change the behaviour from being another image entirely, to the same image with a different background-position, so the rollover loads invisibly.
edit: css rollover without image swap described here