Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder dswimboy's Avatar
    Join Date
    Nov 2003
    Location
    mostly in Ann Arbor
    Posts
    458
    Thanks
    0
    Thanked 0 Times in 0 Posts

    text to bottom of div

    I have a <div> with a defined height (absolute) and width (page percentage). I want text to be at the bottom of the div. if the window is decreased, i want the text to wrap, but remain in the div. how?

    stripped down example: other <div>s with widths are stacked up on the right, too.
    Code:
    <html>
    <head>
    <STYLE>
    div.one {
    	background-color:yellow;
    	width:15%;
    	height:100px;
    	text-align:center;
    }
    </STYLE>
    </head>
    <body>
    <div class="one">Hello, This is the World</div>
    </body>
    </html>
    "There is more than one way to do it."

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You'll need to put the text in a span, make the span position:absolute;bottom:0;left:0; you will also need to the make the div that contains the span position:relative;


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •