Suppose I have two div as below (logo and admin):
<body id="main_body">
<div id="logo_area">
<div id="logo">
<image></image>
</div>
<div id="admin">
LOG IN
</div>
</div>
</body>
If I want the admin align next the bottom of the div. That is, it looks like this:
--------------------------------------------
IMAGE
LOG IN
--------------------------------------------
I tried the following CSS and it doesn’t work.
#main_body {
margin:0px;
}
#logo_area {
background-color: #086A87;
height: 60px;
}
#logo {
padding-left:10px;
float:left;
width:80%;
margin-left:auto;
margin-right:auto;
}
#admin {
bottom:0px;
}
Can anyone shed some light here please?
Thanks
Add
position:relativeto#logo_areaandposition:absoluteto#adminDEMO
Here is the detailed explanation about absolute and relative position