I'm writing some CSS. I want to create a panel bar, which is always top-most and stays at the bottom of the page, height
is fixed at 50px and width
is unknown. Can a normal DIV do that?
Thank you in advance.
I'm writing some CSS. I want to create a panel bar, which is always top-most and stays at the bottom of the page, height
is fixed at 50px and width
is unknown. Can a normal DIV do that?
Thank you in advance.
At the bottom of the WINDOW? Or the bottom of a page?
If you're looking for it to be at the bottom of your document, then you're looking for something like Sticky-Footer
If you want it at the bottom of the window and to remain while you scroll, you need Position:fixed.
Edit: If you want it to stay on the bottom of the window like the Facebook chat bar, you need this:
.bottom{
position:fixed;
bottom:0;
}
position:fixed; bottom:0
should do the trick.
A div
are block elements, so inheritly are full width of their containing element. If their containing element is the body
tag, and has no width restrictions set, the div should be full browser width.
div {
position: absolute;
bottom: 0;
height: 50px;
z-index: 1000; /* optional, but I set for insurance */
}