2 replies [Last post]
dlorimer
Offline
newbie
MA, USA
Last seen: 17 years 19 weeks ago
MA, USA
Joined: 2003-07-22
Posts: 9
Points: 0

Does IE just not respect 'vertical-alignment:middle'? Is there a way to force the text to be in the absolute center of a DIV? Thanks in advance.
/dylan

d3signmonk3y
d3signmonk3y's picture
Offline
Enthusiast
Toledo, Ohio
Last seen: 17 years 18 weeks ago
Toledo, Ohio
Timezone: GMT-4
Joined: 2003-07-29
Posts: 59
Points: 0

How to get text vertically centered in a DIV?

I'm assuming that the div has a fixed height. If there a set amount of text, this might work.

<div style="height: 400px; position: relative; border: 1px solid black; text-align: center;">
	<span style="margin-top: 200px; display: block;">centered?</span>
</div>

paCkeTroUTer
paCkeTroUTer's picture
Offline
Enthusiast
Melbourne, Australia
Last seen: 7 years 29 weeks ago
Melbourne, Australia
Timezone: GMT+10
Joined: 2003-06-27
Posts: 241
Points: 2

How to get text vertically centered in a DIV?

Maybe this will help:

[url]http://www.csscreator.com/css-node/346url]

http//melbourne.ug.php.net