This is a discussion on "CSS menu displaying wrong in Firefox (fine in IE)" within the Web Page Design section. This forum, and the thread "CSS menu displaying wrong in Firefox (fine in IE) are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
CSS menu displaying wrong in Firefox (fine in IE)
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
CSS menu displaying wrong in Firefox (fine in IE)
If you goto http://www.regentrs.co.uk/test/about/index2.html in IE it looks as it should.
If you goto the same link in Firefox it's displaying wrong. Anyone know of a fix? I have limited knowledge of CSS Find the menu CSS below: .menu2 { width:433px; font-size:1.6em; position:relative; z-index:100; } /* remove all the bullets, borders and padding from the default list styling */ .menu2 ul { padding:0; margin:0; list-style-type:none; } .menu2 ul ul { width:100px; } /* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */ .menu2 li { float:right; width:100px; position:relative; } /* style the links for the top level */ .menu2 a, .menu a:visited { display:block; font-size:0.6em; text-decoration:none; color:#777777; width:100px; height:30px; border:1px solid #fff; border-width:1px 1px 0 0; background:#e0e0e0 url(corner.gif) top right no-repeat; padding-left:10px; line-height:29px; } /* a hack so that IE5.5 faulty box model is corrected */ * html .menu2 a, * html .menu2 a:visited { width:100px; w\idth:100px; } /* style the second level background */ .menu2 ul ul a.drop, .menu ul ul a.drop:visited { background:#d4d8bd url(../../graphics/drop.gif) bottom right no-repeat; } /* style the second level hover */ .menu2 ul ul a.drop:hover{ background:#c9ba65 url(../../graphics/drop.gif) bottom right no-repeat; } .menu2 ul ul :hover > a.drop { background:#c9ba65 url(../../graphics/drop.gif) bottom right no-repeat; } /* style the third level background */ .menu2 ul ul ul a, .menu ul ul ul a:visited { background:#e2dfa8; } /* style the third level hover */ .menu2 ul ul ul a:hover { background:#b2ab9b; } /* hide the sub levels and give them a positon absolute so that they take up no room */ .menu2 ul ul { visibility:hidden; position:absolute; height:0; top:31px; left:0; width:150px; } /* another hack for IE5.5 */ * html .menu ul ul { top:30px; t\op:31px; } /* position the third level flyout menu */ .menu2 ul ul ul{ left:150px; top:0; width:150px; } /* position the third level flyout menu for a left flyout */ .menu ul ul ul.left { left:-150px; } /* style the table so that it takes no part in the layout - required for IE to work */ .menu table {position:absolute; top:0; left:0;} /* style the second level links */ .menu2 ul ul a, .menu ul ul a:visited { background:#d4d8bd; color:#000; height:auto; line-height:1em; padding:5px 10px; width:129px /* yet another hack for IE5.5 */ } * html .menu ul ul a{ width:150px; w\idth:129px; } /* style the top level hover */ .menu2 a:hover, .menu ul ul a:hover{ color:#fff; background:#777777; } .menu2 :hover > a, .menu ul ul :hover > a { color:#fff; background:#777777; } /* make the second level visible when hover on first level list OR link */ .menu ul :hover ul{ visibility:visible; } /* keep the third level hidden when you hover on first level list OR link */ .menu ul :hover ul ul{ visibility:hidden; } /* make the third level visible when you hover over second level list OR link */ .menu ul :hover ul :hover ul{ visibility:visible; } |
|
|
|
#2
|
||||
|
||||
|
Re: CSS menu displaying wrong in Firefox (fine in IE)
if you could post up a screenshot of it in firefox as i dont currently have access to it. Thanks in advance.
Last Blog Entry: Assassin's Creed (Nov 22nd, 2007)
|
|
#3
|
|||
|
|||
|
Re: CSS menu displaying wrong in Firefox (fine in IE)
AS IT CURRENTLY IS IN FIREFOX BELOW and HOW IT SHOULD BE IN INTERNET EXPLORER BELOW THAT
![]() ![]() Last edited by camcc; Oct 19th, 2006 at 15:06. |
|
#4
|
|||
|
|||
|
Re: CSS menu displaying wrong in Firefox (fine in IE)
looks like a matter of a small css issue. What is the CSS you are using to style the menu?
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#5
|
||||
|
||||
|
Re: CSS menu displaying wrong in Firefox (fine in IE)
Looks like you've got a random <ul>/<li> in there somewhere!
Last Blog Entry: Assassin's Creed (Nov 22nd, 2007)
|
|
#6
|
|||
|
|||
|
Re: CSS menu displaying wrong in Firefox (fine in IE)
eek but where? Can anyone have a look?
www.regentrs.co.uk/test/style2_about.css www.regentrs.co.uk/test/about/index2.html I'll pay :-) |
|
#7
|
|||
|
|||
|
Re: CSS menu displaying wrong in Firefox (fine in IE)
list-style-type:none; should be in the li not the ul. The following works in FF. haven't tried in IE but should be fine.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Last edited by moojoo; Oct 19th, 2006 at 15:37. |
|
#8
|
|||
|
|||
|
Re: CSS menu displaying wrong in Firefox (fine in IE)
excellent thanks very much for you help
|
|
#9
|
||||
|
||||
|
Re: CSS menu displaying wrong in Firefox (fine in IE)
Just food for thought: list-style-type: none; in the <ul> versus the <li> makes no difference as it is inherited. While I don't know about support in all browsers, it would seem safer to place it in the ul instead of the li.
|
|
#10
|
|||
|
|||
|
Re: CSS menu displaying wrong in Firefox (fine in IE)
One may think that yes.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#11
|
||||
|
||||
|
Re: CSS menu displaying wrong in Firefox (fine in IE)
Hm, that's odd. I'll check into that because I've never put it in the li. I usually remove padding, however, so I may not have noticed it for that reason.
|
![]() |
| Tags |
| css |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Floating works fine in firefox but not IE ! | marSoul | Web Page Design | 13 | Dec 18th, 2007 18:37 |
| Page not displaying right in IE fine in FF | MotorManiac | Web Page Design | 1 | Jul 16th, 2007 11:57 |
| Can anybody work out why IE6 is displaying my site wrong? | DaddyShortLegs | Web Page Design | 3 | Feb 27th, 2007 13:32 |
| Paragraph & menu showing wrong in FireFox | cbrams9 | Web Page Design | 9 | Oct 25th, 2006 14:19 |
| Website displaying wrong in IE | Daninku | Web Page Design | 6 | Sep 27th, 2005 18:54 |