Question

hi,

Currently the text is at the top of my website but i want it bottom;

 <p style="text-align:relative;">this is best day ever!this is best day ever!this is best day ever!<p> 

when i edit it and add text-align:bottom it dosent works!!!!

Was it helpful?

Solution

Try this code :

  <html>
        <head>
            <title>test</title>
        </head>
        <body>
            <div style="position: relative">
                <p style="position: fixed; bottom: 0; width:100%; text-align: center"> TEXT YOU WANT
                </p>
            </div>
        </body>
    </html>

OTHER TIPS

Try this:

style="position:absolute; bottom:0px;"

Absolutely position the element and set its bottom property to 0.

p{
    position: absolute;
    bottom: 0;
}

Working Example http://jsfiddle.net/zMKbf/

 <p id="Bottom">this is best day ever!this is best day ever!this is best day ever!<p> 

and CSS :

#Bottom {
   position : absolute;
   bottom : 0;
}

Demo

p {
    height:200px;
    display: table-cell;
    vertical-align: bottom;
}

This is a better way...

 <html>
        <head>
            <title>test</title>
        </head>
        <body>
            <div style="display: table;">
                <p style="display: table-row;vertical-align: bottom; text-align: center"> TEXT YOU WANT
                </p>
            </div>
        </body>
    </html>

i found it in this question, http://stackoverflow.com/questions/526035/how-can-i-position-my-div-at-the-bottom-of-its-container/19110204#19110204 in Hashbrown answer

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top