![]() ![]() |
Hi, i would like to decrease the body max-height for ~30px. In Chrome, i have a toolbar (extension), which is located at the bottom of the browser window. I cant read, what's under it, so i need to decrease the content size. Any idea, how to do it?! |
![]() ![]() |
Okay... Had an idea. I think, the best way to solve my problem is to move the contents of the body into a container. This is my first try (which isnt working properly...):
var dH = document.body.scrollHeight,
document.body.innerHTML = '';
Tested it on Google and Facebook and it doesnt work as expected. |
![]() ![]() |
This is scrolling body (longer than the viewport), not a fixed size body (fixed to the viewport), correct? So the problem is that when you get to the end of the page, part of it remains behind your toolbar? How about adding a spacer div to the end of the body so it can scrolls up enough to clear your toolbar? Actually, just a big padding-bottom might do it. (By the way, using innerHTML on the body will flush some event handlers, so it could wreck the functionality of the page.) |
![]() ![]() |
Hell, yeah! Good idea :) On Google (and some other pages), it works. Here on Userscripts (for example) it doesnt. Here's, what i did so far:
var bodyDiv = document.createElement('div');
I want, that the feedbacks panel also appears ABOVE my div and not within. |
![]() ![]() |
SoftCreatR wrote:I assume that element has a style of position:fixed, which the browser presumably computes without regard to what is in the page, since it is fixed to the frame viewport. Could you find anything fixed to bottom:0 and increase that value? I don't know of an efficient way to find such an element. (Now I see why you wanted a separate container, but I think it would need to be a frame or an iframe to work around position:fixed, and I think that might require reloading the document.) |


