0

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.

Kay
  • 845
  • 7
  • 21
  • 33
  • 1
    `html, body{ overflow-y:none; }` if you don't want scrollbars. – Shaz Apr 25 '11 at 12:05
  • @Shaz - its not that I want scrollbars, its for testing on selenium so that I can takescreen shots of the browser. – Kay Apr 25 '11 at 12:30

2 Answers2

1

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)

Community
  • 1
  • 1
Mickel
  • 6,658
  • 5
  • 42
  • 59
0

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

Check this to hide the browser scrollbar

niksvp
  • 5,545
  • 2
  • 24
  • 41