Topic: Aligning Text Vertically (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10862" title="Pages that link to Topic: Aligning Text Vertically (Page 1 of 1)" rel="nofollow" >Topic: Aligning Text Vertically <span class="small">(Page 1 of 1)</span>\

 
eSoTIX
Obsessive-Compulsive (I) Inmate

From:
Insane since: Aug 2002

posted posted 11-30-2002 09:09

Hello!
I have a div and i want to align the text in it vertically so that it is in the middle. I'm using CSS and have tried the "vertical-align" attribute, which apparently does not work with Div's, and only works with TD elements or something. Is there a workaround for this matter? Thanks!

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 11-30-2002 20:43

possibilities -

1) set the vertical-align property for the <p> tag instead, put your text in a paragraph inside the div.

2) set the div as "display:inline", although that may effect the Div's palcement rather than the placement of items inside the div.




[This message has been edited by DL-44 (edited 11-30-2002).]

eSoTIX
Obsessive-Compulsive (I) Inmate

From:
Insane since: Aug 2002

posted posted 11-30-2002 21:44

Thanks a bunch!

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 12-01-2002 02:07

What did you do, and why did it work?

eSoTIX
Obsessive-Compulsive (I) Inmate

From:
Insane since: Aug 2002

posted posted 12-01-2002 02:19

Well, apparently neither of those ways seemed to work. So in the end, I just made a table inside the div, and set in my CSS:

TD {vertical-align:middle;}



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu