Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > div Wont Vertically Align

Reply
Thread Tools

div Wont Vertically Align

 
 
homer
Guest
Posts: n/a
 
      01-26-2005
Cheers,

Can someone tell me why the text in top right div wont vertically align to
bottom? CSS vertical-align only works with images in some instances, so I
put it in the html also, but no luck. I also tried a span tag. It always
worked in table cells, but why not in div boxes?
http://wholives.com/temp/css4.html
Any suggestions?
Thanks,
Me


 
Reply With Quote
 
 
 
 
Spartanicus
Guest
Posts: n/a
 
      01-26-2005
"homer" <(E-Mail Removed)> wrote:

>Can someone tell me why the text in top right div wont vertically align to
>bottom? CSS vertical-align only works with images in some instances, so I
>put it in the html also, but no luck. I also tried a span tag. It always
>worked in table cells, but why not in div boxes?
>http://wholives.com/temp/css4.html


http://www.w3.org/TR/CSS21/visudet.h...vertical-align
'vertical-align'
Applies to: inline-level and 'table-cell' elements

--
Spartanicus
 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      01-26-2005
"homer" <(E-Mail Removed)> wrote:

>Can someone tell me why the text in top right div wont vertically align to
>bottom?


Because there's nothing in your CSS that could make it do so.

> CSS vertical-align only works with images in some instances, so I
>put it in the html also, but no luck. I also tried a span tag. It always
>worked in table cells, but why not in div boxes?


'vertical-align'
Applies to: inline-level and 'table-cell' elements

http://www.w3.org/TR/CSS21/visudet.h...vertical-align

>http://wholives.com/temp/css4.html
>Any suggestions?


You can make the text appear lower down by setting an appropriate
margin-top or padding-top to either the <h1> or the containing div. Or
you can wrap the <h1> and <h2> in another div and absolutely position
that to the bottom of the containing div.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      01-27-2005
On Wed, 26 Jan 2005 13:43:45 -0600 homer wrote:

> Cheers,


> Can someone tell me why the text in top right div wont vertically align
> to
> bottom? CSS vertical-align only works with images in some instances,
> so I
> put it in the html also, but no luck. I also tried a span tag. It
> always
> worked in table cells, but why not in div boxes?
> http://wholives.com/temp/css4.html
> Any suggestions?
> Thanks,
> Me


Get rid of the <br> tags at the bottom of the code!
Define a height for your menu.
Get rid of the position absolute for the divisions.
use float:left to position them side by side.
For positioning a paragraph at the bottom of a cell try this:

<p style="position:relative; bottom:5px;>






 
Reply With Quote
 
homer
Guest
Posts: n/a
 
      01-27-2005
> Get rid of the <br> tags at the bottom of the code!
> Define a height for your menu.
> Get rid of the position absolute for the divisions.
> use float:left to position them side by side.




float:left to position div boxes side by side? It works with two objects
in one div, but not two divs. I tried nesting the two divs with the float,
but no luck either.
http://wholives.com/temp/d.html
(internal css)
homer


 
Reply With Quote
 
Anonymous
Guest
Posts: n/a
 
      01-27-2005

"homer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> > Get rid of the <br> tags at the bottom of the code!
> > Define a height for your menu.
> > Get rid of the position absolute for the divisions.
> > use float:left to position them side by side.

>
>
>
> float:left to position div boxes side by side? It works with two

objects
> in one div, but not two divs. I tried nesting the two divs with the

float,
> but no luck either.
> http://wholives.com/temp/d.html
> (internal css)
> homer
>


It's the margin that's causing the problem


 
Reply With Quote
 
homer
Guest
Posts: n/a
 
      01-28-2005
>
> It's the margin that's causing the problem



I'll try that: Thanks.............


 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to align items vertically on a datagrid Julia B ASP .Net 5 01-30-2008 01:42 PM
<div align=center> also affects align of dynamic dropdown item text Steve Richter ASP .Net 1 06-24-2007 07:11 PM
CSS Vertically Align Text Trevor HTML 5 04-29-2006 02:31 PM
how can align the text vertically in a table cell atin45gupt@gmail.com HTML 1 01-17-2006 04:25 PM
vertically align absolutely positioned div elements Guybrush Threepwood HTML 1 12-14-2005 09:29 PM



Advertisments