This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17614 - align-vertical:middle issue
Summary: align-vertical:middle issue
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: Box model (show other bugs)
Version: unspecified
Hardware: PC Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-27 03:35 UTC by Yang Sun
Modified: 2012-12-04 00:52 UTC (History)
0 users

See Also:


Attachments

Description Yang Sun 2012-06-27 03:35:07 UTC
Hi all

I have a question on align-vertical.

I want to develop a page.And in a element container <div>, there are textarea, input box, a picture, I want them to in the same line, the line in the vertical-middle of the div.

So I use align-vertical:middle.But I failed to align them a line.



<html>
<body>
<div style="width:100%; height: 400px; background-color: #cfcfcf;">
	<span style="vertical-align:middle;">text</span>
	<input type="text" style="vertical-align:middle;" />
	<img src="pic.jpg" style="vertical-align:middle;" />
</div>
</body>
<html>

I test it using chrome,IE9, I can not align them in a line.

My suggestion,can we use vertical-align for parent object, so all the child objects in this parent object can align together in the middle :
<html>
<body>
<div style="width:100%; height: 400px; vertical-align: middle; background-color: #cfcfcf;">
<span>text</span>
<input type="text" />
<img src="pic.jpg" />
</div>
</body>
</html>

suggestions and comments both welcome