Reputation: 12317
I have 4 different divs. The last one is footer. How can I put the last div at top using CSS?
Upvotes: 0
Views: 2003
Reputation: 127
try this:
<div id = "FooterAtTop">what ever here</div>
put this in CSS file or in <style>
in head:
#FooterAtTop
{
position: absolute;
top:0px;
left:0px;
}
Though if you want to keep it floating do this:
#FooterAtTop
{
position: fixed;
top:0px;
left:0px;
}
Hope it helps.
Upvotes: 1
Reputation: 2901
The last one is the footer but you want to put it at the top ? I'm not sur what you want to do ^^
With JS you could achieve it without doubt.
Maybe could you explain a little bit your situation :-) and when do you want to put the last one to footer (after page is loaded ?)
But with this it should work :
.class1 { position:absolute; top:0; left:0; }
But be sure that your class1 is wraped in another class2 which contains :
.class2 { position:relative; }
Upvotes: 1