Kay
Kay

Reputation: 845

Maximise browser window and height

Is there a way in [pure] JavaScript to maximise a browser window and increase its height such that it doesn't have scroll bars? Even if the height becomes greater than the screen.

Thanks all

Update

The reason I want to do this is so that I can capture the full page of the site as an image using selenium. The native selenium functions do not work on all browsers and do not do exactly what I want so I've built my own image capture in C sharp but I need some JS code to increase height of browser.

Upvotes: 0

Views: 1368

Answers (2)

niksvp
niksvp

Reputation: 5563

The html element has the overflow property added to it with a value of hidden.

Check this to hide the browser scrollbar

Upvotes: 0

Mickel
Mickel

Reputation: 6706

There is no pretty solution, but this is as close as you get: How to make the window full screen with Javascript (stretching all over the screen)

Upvotes: 1

Related Questions