wow
wow

Reputation: 8259

CSS - position fixed and bottom

If you turn off javascript on stackoverflow you will see the noscript-warning on the top

#noscript-warning {
font-family:Arial,Helvetica,sans-serif;
position:fixed;
top:0;
left:0;
width:100%;
z-index:101;
text-align:center;
font-weight:bold;
font-size:120%;
color:#fff;
background-color:#AE0000;
padding: 5px 0 5px 0;
}

Question. How to position the alert on bottom of browser?

Upvotes: 2

Views: 3267

Answers (5)

Ikke
Ikke

Reputation: 101261

Put

html
{
    height: 100%;
}

in your CSS.

Upvotes: 0

Samw
Samw

Reputation: 128

bottom:0; should do the trick.

Just remove top:0;.

Upvotes: 0

spoulson
spoulson

Reputation: 21601

See Fixing position:fixed for Internet Explorer for tips on IE compatibility in either top or bottom positioning. Particularly, it's ugly when bottom positioned block scrolls up with the content, instead of staying fixed as expected.

Upvotes: 3

Jason Leveille
Jason Leveille

Reputation: 1190

Forgetting about browser support, change:

top:0;

to

bottom:0;

Upvotes: 2

erenon
erenon

Reputation: 19148

CSS:

bottom: 0;

Upvotes: 7

Related Questions