This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Banner's height shifts and goes over content, only with Firefox browser

  • 13 cavab
  • 3 have this problem
  • 1 view
  • Last reply by gonpires

more options

This is a random page in my site where the behavior takes place. ( http://accountabletest.com/services/) Notice how the banner's height shifts and goes over content. The issue happens only in Firefox, not in Safari, Chrome or even IE (IE used to make a weird effect too, but when I replaced the % with specific px quantities, the issue stopped). All subpages but the homepage are affected. I don't know why is this happening. The issue takes place in small screens and also in big ones (I use a media query for min-width=144px).

This is a random page in my site where the behavior takes place. ( http://accountabletest.com/services/) Notice how the banner's height shifts and goes over content. The issue happens only in Firefox, not in Safari, Chrome or even IE (IE used to make a weird effect too, but when I replaced the % with specific px quantities, the issue stopped). All subpages but the homepage are affected. I don't know why is this happening. The issue takes place in small screens and also in big ones (I use a media query for min-width=144px).

All Replies (13)

more options

This template has the most peculiar use of boxes; stuff sticks out all over the place. I've also got a horizontal scrollbar, which is never a good sign.

What I notice on the Services page (http://accountabletest.com/services/) is that if I move my mouse over any of the links in the two boxes on the right side, the body content moves down a considerable distance. I can't understand why that should occur. When the window is wide, this moves the text out of the banner, but when the window is narrower, it opens up a large gap.

Modified by jscher2000 - Support Volunteer

more options

When I view source on the page, there are 137 lines above the DOCTYPE declaration, which should be line 1. I think there's something seriously messed up in your templates.

more options

I've noticed the same thing. If you move the mouse over the sidebars the effect takes place. If you just load the page with no movement, the page renders fine. What you mention about the DOCTYPE declaration is because in using a wordpress template. But that does not seem to affectany other browser. Only Firefox.

more options

If you disable JavaScript while loading the page then the content also is moved down.
It looks that a script adds some content that moves up the main content.
There are also weird things when you make the wind quite small.
Using the Inspector shows that the content is not really in the container, but that there are negative margins active.
The height of div.bannercustom is also to large with 580px and should probably be 400px (auto) as that is the height of the banner image.
You should probably check the margin of the div.headwhite2 (margin-top:-5% -> 8%).

more options

Hi gonpires, I realize that some browsers are more tolerant of nonstandard and downright invalid HTML, but Firefox often is pickier. No WordPress template should put content above the opening <html> tag. The only thing above that should be your DOCTYPE declaration.

more options

I've just disabled javascript using the about:confg command, and the problem seems to have disappeared. Should I remove the javascript code?

Modified by gonpires

more options

Hi gonpires, the JavaScript is what makes the site design responsive to resizing. If you don't need that aspect of the template, you could remove that part. However, I don't know which of the script files is causing the problem, so it's hard to suggest how to remove just the problematic parts without removing important functionality.

more options

Thank you @jsher2000 for your accurate support. Glad to know there's someone there just in case. Have a good week!.

more options

Hi again!

I've arranged the DOCTYPE declaration and also removed the Javascript code entirely from the code (wasn't needed, but was included in the template), as mentioned by @jscher2000 .

Moreover, I've checked the margin of the div.headwhite2 (margin-top:-5% -> 8%), and replaced the % with accurate pxs, as recommended by @cor-el. Did also tried switching the banner's heigh (then I returned to how it was, because no changes were seen on the issue).

The problem persists: Banner's height switches upon reload and the div 'headwhite2' moves down while moving the poiner over the sidebar's links.

more options

I'm still seeing the height of div.bannercustom as 580px and the margin of div.headwhite2 as -5%, so it looks that you weren't successful in making the changes that I proposed and that you posted above.

.bannercustom{ position: relative;
	z-index: 11;
	left: 0px;
	width: 100%;
	top: 0px;
	float: left;
	height: 580px; /*auto or 400px*/
}
.headwhite2{ position: relative;
	z-index: 88;
	left: -2px;
	width: 1070px;
	background-color: white;
	float: left;
	margin-bottom: 4%;
	margin-top: -5%; /* 8% */
}
more options

@cor-el, Please clear your cache. My code is exactly as you recommend.

.bannercustom{ position: relative; z-index: 11; left: 0px; width: 100%; top: 0px; float: left; height: auto; }

.headwhite2{ position: relative; z-index: 88; left: -2px; width: 1070px; background-color: white; float: left; margin-bottom: 4%; margin-top: 8% ; }

Thank you for your response. From your experience, have you ever been through something similar?, I just don't know how to handle this.

Modified by gonpires

more options

Did you upload the new code?

A reload and bypass the cache still shows the old code.

Here is a screenshot from Google Chrome.

more options

Sorry I have two divs under the same name (because they are used on different media queries for different screen sizes). You were inspecting the site on a smaller screen than I was. Now I'm certain that the divs are the way you recommend. You can see that the problem is still there though. @cor-el