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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem CSS 'vertical-align' property

Status
Not open for further replies.

davemarsh

Technical User
Feb 11, 2003
12
IN
Hi, should'nt the child span be aligned in the middle of the parent in this example?? - what am i doing wrong? :

Code:
<span style=&quot;width: 300px; height: 300px; background: #ccc;&quot;>
	<span style=&quot;vertical-align: middle;&quot;>In the Middle?
	</span>
</span>

Cheers...
 
snapshot from
vertical-align
Example code ... H2 { vertical-align: top }

Browser support for vertical align is almost non-existent.

At this time the only values supported by IE 4 and 5 are
sub ..... puts the element in subscript.
super ..... puts the element in superscript.

upon my further testing the statement in NN and IE I found it to be accurate as well. the text did align in NN7 but not in IE5.5 _________________________________________________________
for the best results to your questions: FAQ333-2924
Is your question a most FAQ?? Find out here FAQ333-3048
 
Yeah, cheers - it seems IE only supports this CSS property if the element itself has the 'valign' attribute - so SPAN would'nt work.. ah well, i'll do something with tables.

cheers - dave..
 
vertical-align does not behave the same as valign in tables, works differently.

read the css spec for all the details. ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top