Vertically aligning text at the bottom

This is a discussion on "Vertically aligning text at the bottom" within the Web Page Design section. This forum, and the thread "Vertically aligning text at the bottom are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Apr 15th, 2007, 06:02
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Vertically aligning text at the bottom

Why are the simple things always the hardest?
:throw:


I have two divs inside a container div.
DivOne may be a single line of text... or it may wrap to 2 lines.
DivTwo will always be a single line.
I want both of them to align at the bottom of the container div (regardless of whether DivOne is one line or two.)

This doesn't work:
Code: Select all
.wrap {
    vertical-align:bottom;
}

.divONE {
    width:120px;
    vertical-align:bottom;
}

.divTWO {
    width:280px;
    vertical-align:bottom;
}
Changing "bottom" to "text-bottom" on one or more (or all or none) doesn't work, either.

Surely there's an easy way to do this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Apr 15th, 2007, 12:08
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Vertically aligning text at the bottom

See if this link helps you...http://phrogz.net/CSS/vertical-align/index.htmlhttp://phrogz.net/CSS/vertical-align/index.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Apr 15th, 2007, 14:37
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Re: Vertically aligning text at the bottom

It supports the conclusion I came to within minutes of that post last night - "Screw it. I'm going back to tables." (Not for everything. Just for that particular page.) Thanks for the help, though, Linda!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Apr 16th, 2007, 00:18
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Vertically aligning text at the bottom

What about positioning? That would do it easily.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Apr 16th, 2007, 00:43
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Re: Vertically aligning text at the bottom

Quote:
Originally Posted by Ryan Fait View Post
What about positioning? That would do it easily.
How? I've been trying that and failing miserably!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Apr 16th, 2007, 00:59
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Vertically aligning text at the bottom

I don't really understand exactly what you're looking for, but try playing with this:

Code: Select all
.wrap {
    position: relative;
}
.divONE, .divTWO {
    position: absolute;
    bottom: 0;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Apr 16th, 2007, 02:44
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Re: Vertically aligning text at the bottom

I've already reverted back to a table, but I still want to learn...

So, as long as I don't specify a value for left or right, I can still have 2 divs/elements sitting side-by-side? (But they'll be bottom-aligned within the container so it won't matter whether the height of the one on the left expands or not?)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
alignment, vertical, vertical align

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie :-Trouble aligning text within div tag Deepa7476 Web Page Design 8 Nov 29th, 2007 08:59
vertically center text alexgeek Web Page Design 2 Aug 14th, 2007 12:47
Align text vertically in a box josoap Web Page Design 3 Jul 12th, 2007 17:29
Text running from top to bottom - How? rubyfruit Web Page Design 12 Oct 2nd, 2006 11:21
Aligning blocks at the bottom of a containing block nomis80 Web Page Design 2 Jul 25th, 2005 22:05


All times are GMT. The time now is 18:33.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42