]I have a basic tab system in place using divs. Each tab has a box (border) and my client wants the bottom border to disappear during a hover. To complicate matters, the full width of the page (not just the tabs) needs a bottom border at the same level the tabs would normally have them.
I have attached two images. “Normal” shows the standard view. “Hover” shows how they want the tab to look - in this case, when the 2nd tab is hovered over.
As you can see by the code below - to get the full width bottom border I apply it to the “box” style. The tabs do not have a bottom border applied. What I need, is for the bottom border to disappear when I hover over the tab. I thought I would be smart and apply a White Bottom Border to the tab on hover, but that just pushes the original bottom border down - it still appears.
Thanks for the help on this. Yes - it certainly works.
I see you used what I thought would work (adding a white border-bottom to the hover) but fixed the problems I was having with the “cf” selectors.
Any reason why there are two “cf:after” selectors? Could the clear:both not go in the same selector as the other declarations?
{clear:both} is applied after floats. It serves no purpose before them.
There are several “clearfix” solutions that work where {overflow:hidden} is impractical. The one that I used here works for me in all situations. Some newer methods are shorter and only use 1 generated element, but do not work in all situations. I’m lazy and stick to the most reliable. Pick your favorite.