cssfirefoxdotnetnukedotnetnuke-5

CSS menu broken in Firefox (display:table-cell;)


HTML:

<td align="center" width="100%">
<a class="Forum_ib_moderate" href="Default.aspx" title="Moderate"></a>
<a class="Forum_ib_admin" href="Default.aspx" title="Admin"></a>
...

CSS:

A.Forum_ib_moderate:link, A.Forum_ib_moderate:visited, A.Forum_ib_moderate:active, A.Forum_ib_moderate:hover
{
background-image: url(images/ib_moderate.png);
background-repeat: no-repeat;
background-position: center;
padding-left: 2px;
padding-right: 2px;
padding-top: 8px;
padding-bottom: 0px;
height: 35px;
width: 35px;
display:table-cell;
}

A.Forum_ib_admin:hover
{
background-image: url(images/ib_admin_hover.png);

}

the menu looks just fine in IE, shows up vertical in Firefox. If i turn off "display:table-cell;" style in Firebug and then turn it back on, it fixes that menu node.

alt text

any ideas?

p.s.: i don't want to mess with the menu itself, since it's a part of a DNN Forum 4.4.3. I'd rather fix the CSS to make it show correctly.


Solution

  • Actually I think you'll find that IE works because it ignores display: table-cell. Display: table-cell is actually you're problem.

    What I'm guessing is happening is that IE is reverting those to be inline element, hence horizontal.

    Change it to:

    display: inline;
    

    add some padding (left and right) as necessary and you'll get what you want.

    Alternatively you can float them (left and/or right).

    Besdies, they're already in a table cell. Table cell display inside that is a bit wrong.