I would like to put a line "All Rights Reserved..." at the bottom of the page. I tried to use absolute positioning, but this does not work as expected when the window resized to smaller height.
How can I achieve this simple goal ?
Set the position of div at the bottom of its container can be done using bottom, and position property. Set position value to absolute and bottom value to zero to placed a div at the bottom of container.
The trick is in <br> where you break new line. So, when page is small you'll see footer at bottom of page, as you want.
You can also use css properties like: vertical-align:bottom; and float:right; .
The <marquee> tag in HTML is used to create scrolling text or image in a webpages. It scrolls either from horizontally left to right or right to left, or vertically top to bottom or bottom to top.
You might want to put the absolutely aligned div in a relatively aligned container - this way it will still be contained into the container rather than the browser window.
<div style="position: relative;background-color: blue; width: 600px; height: 800px;">
<div style="position: absolute; bottom: 5px; background-color: green">
TEST (C) 2010
</div>
</div>
Try:
.bottom {
position: fixed;
bottom: 0;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With