PDA

View Full Version : HV Menu (sorry) problems in Firefox



trumpet
04-13-2005, 02:59 PM
Hi chaps!

I've been working on an install of the HV menu, which is currently up at this address: www.shoutitout.biz.

While the menu looks fine in IE, it displays 1 pixel off in Safari, and 10 pixels off in Firefox :eek: - my default browser.

The menu is in a div with a transparent background, so it should be fine. I'm not unduely bothered by the Safari problem, but it looks terrible in Firefox!

Has anyone else come across this? I found a couple of posts in the archive, but other people seem to have found that the MenuPos div fixed things - not so for me!

Cheers, Trumpet

jscheuer1
04-13-2005, 03:24 PM
There are at least two 'hacks' for positioning things differently in Mozilla (includes FF) from IE. I like the !important hack but, it is the less correct method sometimes causing problems in other browsers like Safari maybe? I've never seen this, just heard about it. Anyways, the way it works is in an inline style declaration or in the style section or stylesheet you start with the value you want for Mozilla, apply the hack and then list the value for IE, like so:

left: 10px !important; left 20px;

Another method, considered more correct is the 'star' html hack, it has various refinements but, the basic method (which works only in the style section or on a stylesheet, as far as I know) is to follow the Mozilla value with a 'star' (*) html value for IE like so:

div.menu {
left: 10px;
}

* html div.menu {
left: 20px;
}

Hope adapting one of these will do it for you.

trumpet
04-14-2005, 06:32 PM
Hi,

Cheers for the reply. It works, kind of...It's fine unless the page has a scroll bar down the side, in which case the damn thing's 10 pixels too far left!

Only way I can see to fix it is to make sure the page never has to scroll, unless anyone knows a hack to use a different style if a scrollbar exists?

Cheers, Trumpet

jscheuer1
04-14-2005, 07:09 PM
I've always thought that habit of Mozilla having no scrollbar by default on a short page was a bad idea. Well, you could redesign everything to be 10px further to the right to begin with. How you do that depends upon wether positioning is absolute or relative in the first place, if the rest of your page is relative or just positioned by HTML flow, try:

<body>
<div style=position:relative;left:10px>
rest of page content goes here
</div></body>then have the menu start out 10px more to the right. Another idea would be to make sure the screen has scrollbars to begin with and adjust your menu's positioning accordingly. To do that use:
body {
height:100%;
}in your style section/stylesheet or:

<body style="height:100%;">in your body tag.

sunshine28
07-19-2005, 07:19 PM
The current hack listed on this forum is only good for sites that are consistant in page length (scroll or non-scrolling pages). Unfortunately, almost all Web sites are not consistant. :(

Perhaps we need to address this to the author of the script (http://www.burmees.nl)?

Does anyone know of a better way to have Firefox display the HV menu correctly (rather than being off 10 pixels)?