The width property is used to fill a div remaining horizontal space using CSS. By setting the width to 100% it takes the whole width available of its parent.
Example 1: This example use width property to fill the horizontal space. It set width to 100% to fill it completely.
Example 2: This example use width property to fill the horizontal space. It set width to 100% to fill it completely.
- How to make horizontal line with words in the middle using CSS?
- CSS | Layout - Horizontal & Vertical Align
- CSS | column-fill Property
- CSS | animation-fill-mode Property
- HTML | canvas fill() Method
- Computer Organization | Horizontal micro-programmed Vs Vertical micro-programmed control unit
- Space between two rows in a table using CSS?
- How to add space (" ") after an element using :after selector in CSS ?
- CSS | white-space Property
- Clone a stack without extra space
- How to tab space instead of multiple non-breaking spaces (nbsp)?
- Program to replace every space in a string with hyphen
- How to remove the space between inline-block elements?
- How to make a redirect in PHP?
- How to make div not larger than its contents using CSS?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.