I have the following HTML markup, and I want the div div tag to always be 5 pixels from the bottom of the parent container.
I can manually use it with a trial and erroneous position using margin-top, but if I had to change the logo or resize the div, I would have to change this value again using the trial version and error. A much better solution would be to say whether to always be at a distance of 5 pixels from the bottom, and not indicate that it is X pixels on top.
Why is this not working?

<body>
<div id="header">
<img src="../../Content/images/cumaviLogo.png" alt="Cumavi.com - Compras y ventas online en Bolivia!" />
<ol id="topuserbar">
<li>Bienvenidos, <span class="userSalute">Sergio!</span></li>
<li><a href="#">Mis Anuncios</a></li>
<li><a href="#">Perfil</a></li>
<li><a href="#">Cerrar Sesion</a></li>
</ol>
</div>
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
</body>
#header
{
background-image: url('images/headerBackground.png');
background-repeat:repeat;
width:auto;
}
#topuserbar
{
border: 1px solid red;
font-family:Georgia;
font-size:large;
float:right;
margin-top:45px;
}
#topuserbar ol
{
}
#topuserbar li
{
display:inline;
margin-left:10px;
color:#fff;
}
delete
source
share