Click to See Complete Forum and Search --> : Align text to bottom of div


mattastic
03-15-2007, 11:59 AM
Hi Folks,

I know this is a popular query, have searched the forum, but still can't seem to find an answer, here is my code, I'd like to do the above, any ideas?

<style type="text/css">
<!--
.backpic {
background-attachment: fixed;
background-image: url(images/restbutton.jpg);
background-repeat: no-repeat;
background-position: 0px bottom;
height: 142px;
width:204px;
}
.backpic p{
position:absolute;
left:100%;
bottom:0px;
}


-->
</style>
<div class="backpic"><p>
text</p></div>

KDLA
03-15-2007, 12:41 PM
You might take a look at this:
http://www.ibloomstudios.com/article6/

(Also, did you know that IE doesn't support background-attachment fixed for divs, only the body?)

KDLA

mattastic
03-20-2007, 08:01 AM
Thanks for your reply.

However, I'm still having trouble understanding this.

Refering to the article, the code below should work?

Can anyone help me please? All I want to do is align the text to the bottom of the div.


<style type="text/css">
<!--
div {
background-image: url(images/restbutton.jpg);
background-repeat: no-repeat;
background-position: 0px bottom;
background-color: red;
height: 142px;
width:204px;
}
div * {
vertical-align: Baseline;
}



-->
</style>
<div>
<p>
text</p></div>

CreativeCozza
03-21-2007, 06:35 AM
which div?

I use this to move my text around divs:



P {
margin-left: 25px // Moves content 25px from the left
margin-top: 140px // Moves content 140px from top
}



Play around with the margin top. Thats what I use. Maybe there's a "margin-bottom" ? I'm new to divs myself...