Why is my site so wide. (tens of thousands of pixels)
-
21-06-2021 - |
Question
A site I'm working on: http://bayhouse.biklopsdesign.com , is somehow INSANELY wide. This causing a horizontal scrollbar as well making fixed positioning really annoying.
Can anyone tell what's going on? I've been Firebugging for days with no relief. :/
Solution
This was hard to find!
Your link <a id="OTPoweredBy">...</a>
has a margin
of -9999px;
. If I set the margin
to something more sensible, all the right-scrolling disappears.
OTHER TIPS
The answer is that you have declared width as a percentage on fixed positioned elements. This takes a percentage of the viewport, not of the parent container.
So, for example, my viewport is 1900px wide. That means that every element that's set for position: fixed; width: 100%
will be 1900px wide. You do this in a number of places, for example on aside#text-15.header_area
. See also this SO answer.