2

On my website, I have a glitch on links in my drop-down menu. I'm using code from Dynamic Drive jQuerySlideMenu.

In Firefox 19, the underlines appear above the text.

How it appears in Firefox.

This is how it's supposed to appear, in Chrome 27:

enter image description here

and in Internet Explorer 10:

enter image description here

I've inspected the elements in Firebug but I'm not sure exactly what's causing this issue. There is no CSS playing with the underline that I can see.

After some quick searching, I found this issue reported in bugzilla in 2012, which is the only thing I found on underlines appearing above the text. It points to vertical-align possibly being the reason for this. I changed vertical-align in the slider CSS but it made no difference (top, middle or bottom.) I'd like to fix it. Is there anything blatantly obvious I'm missing, or some good reason this is happening?

Elle
  • 3,695
  • 1
  • 17
  • 31

2 Answers2

3

Remove vertical-align: middle; from .jqueryslidemenu .app line 54 in jqueryslidemenu.css and it will solve the issue.

Hence forth use firebug which will be handy in such situations

Mr. Alien
  • 153,751
  • 34
  • 298
  • 278
2

You correctly identified vertical-align as the culprit.

The hovered item is being styled by this line in jqueryslidemenu.css:

.jqueryslidemenu .app {
    height: 18px;
    vertical-align: middle;
}

When I remove vertical-align in Firebug, the problem disappears. Thus, remove vertical-align from that line.

If you cannot edit jqueryslidemenu.css for whatever reason, just add the following to your own css file:

.jqueryslidemenu .app {
    vertical-align: inherit;
}
Derek Henderson
  • 9,388
  • 4
  • 42
  • 71
  • Ah, I didn't check that the default value of `vertical-align` was `baseline`, which is why I didn't try removing the property. Thanks, and a good answer for SO, too. – Elle May 30 '13 at 14:20