- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to make the web page height to fit screen height with HTML?
Many ways are available to make the web page height to fit the screen height −
Give relative heights −
html, body { height: 100%; }
You can also give fixed positioning −
#main { position:fixed; top:0px; bottom:0px; left:0px; right:0px; }
You can also use Viewport height to fulfill your purpose −
height: 100vh;
- Related Articles
- How to make the main content div fill height of screen with CSS and HTML
- HTML Screen height Property
- How to use image height and width attribute in HTML Page?
- How to completely fill web page with HTML canvas?
- How to make a GridLayout fit screen size in Android?
- How to stretch elements to fit the whole height of the browser window with CSS?
- How to make page links in HTML Page?
- Why doesn't height: 100% work to expand divs to the screen height?
- How to make a GridLayout fit screen size in Android using Kotlin?
- How to get the Width and Height of the screen in JavaScript?
- How to add the height of the element in HTML?
- How to set fit webview screen in android?
- How can I get android device screen height, width?
- How to set cell width and height in HTML?
- How to use height and width attributes in HTML?

Advertisements