CSS | bottom Property
The bottom CSS Property allows the vertical position of an element to be altered. Bottom property is used to set the value of the position of an element from the bottom of the viewport.
Syntax:
bottom: auto|length|%|initial|inherit;
Property values
- auto: This is the default value of the bottom property. It sets the bottom property based on the browser.
Syntax:
bottom: auto;
Example:
<html><head><title> Bottom </title></head><body><h1style="color:darkgreen;">GeeksforGeeks</h1><pstyle="position: fixed; bottom: auto;">This line will be auto adjustedfor bottom based on the browser.</p></body></html>chevron_rightfilter_noneOutput:

- Length: It sets the bottom edge position in px, cm also negative values are allowed
Syntax:
bottom: 5px;
Example:
<html><head><title> Bottom </title></head><body><h1style="color:darkgreen;">GeeksforGeeks</h1><pstyle="position: fixed; bottom: 50px;">This line will be adjusted for bottom basedon the length provided, i.e. 50px.</p><pstyle="position: fixed; bottom: -15px;">This line will be adjusted for bottom basedon the length provided, i.e. -15px.</p></body></html>chevron_rightfilter_noneOutput:

- Percentage: It sets the value in % of the containing Element.
Syntax:
bottom: 10%;
Example:
<html><head><title> Bottom </title></head><body><h1style="color:darkgreen;">GeeksforGeeks</h1><pstyle="position: fixed; bottom: 10%;">This line will be adjusted for bottom basedon the percentage provided, i.e. 10%.</p><pstyle="position: fixed; bottom: -5%;">This line will be adjusted for bottom basedon the percentage provided, i.e. -5%.</p></body></html>chevron_rightfilter_noneOutput:

- initial: It sets the property value to its default value.
Syntax:
bottom: auto;
Example:
<html><head><title> Bottom </title></head><body><h1style="color:darkgreen;">GeeksforGeeks</h1><pstyle="position: fixed; bottom: initial;">This line will be adjusted for bottom basedon the initial value of the browser.</p></body></html>chevron_rightfilter_noneOutput:

- inherit: It inherits the position from the parent element.
Syntax:
bottom: auto;
Example:
<html><head><title> Bottom </title></head><body><h1style="color:darkgreen;">GeeksforGeeks</h1><pstyle="position: fixed; bottom: inherit;">This line will inherit the positionfrom the parent element.</p></body></html>chevron_rightfilter_noneOutput:

- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
- CSS margin-bottom Property
- CSS padding-bottom Property
- CSS border-bottom Property
- Web API | DOMRect bottom property
- CSS | border-bottom-width Property
- CSS | border-bottom-right-radius Property
- CSS | border-bottom-color Property
- CSS | border-bottom-style Property
- CSS border-bottom-left-radius Property
- How to position a div at the bottom of its container using CSS?
- How to align content of a div to the bottom using CSS ?
- PHP | SplDoublyLinkedList bottom() Function
- How to detect when user scrolls to the bottom of a div ?
- How to create footer to stay at the bottom of a Web page?
- How to scroll automatically to the Bottom of the Page using jQuery?
Browser Supported: The browsers supported by bottom Property are listed below:
Recommended Posts:
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.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.



