VansFannel VansFannel -4 years ago 68
CSS Question

How to know the height the space left on a browser by the menus, bookmarks and tabs?

I want make a page (HTML + CSS) that fits all the space left on the browser without horizontal and vertical scrollbars.

Now you are readind this question on a web browser and, probably, you can see horizontal scrollbar. I want to use this space without using horizontal and vertical scrollbars.

Answer Source

I think you are looking for window.innerWidth and window.innerHeight and its friends.

Check out this great table on for an overview on which variables are supported by which browser.

Edit: Pure CSS

In CSS you have width: 100% and height: 100%. If those work for your scenario, use them. To avoid scroll bars, you can use overflow: hidden on the body, but be very careful because this prevents scrolling completely. It depends on what you want to do.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download