Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

positioning inside a div tag 1

Status
Not open for further replies.

kzn

MIS
Jan 28, 2005
209
GB
Hi

I have a div tag with a set height of 80px. Inside of it I have a table, one of the rows sometimes has two lines of text in it. I would like to vertically position the table in the middle within the div. Is there a way I can do this? Any help appreciated. Thank you
 
It's not very easy to position block level elements in the vertical center of another block level element. I would usually recommend this code:


However, for something that is only 80px in height, I would not think it is worth the trouble and would solve things with approximate margins on top and bottom.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Thank you Vragabond, works great. I know its a small div, but it does not look good without the auto fit. Thanks again :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top