Change vertical-align for inline-block elements to baseline. Set textarea vertical-align to top.

This commit is contained in:
necolas 2011-05-06 21:54:19 +01:00
parent be21f763ee
commit 08fc3b3d9c

15
normalize.css vendored
View File

@ -31,7 +31,7 @@ textarea,
video { video {
display: inline-block; display: inline-block;
*display: inline; *display: inline;
vertical-align: top; vertical-align: baseline;
*zoom: 1; *zoom: 1;
} }
@ -222,12 +222,8 @@ legend {
} }
/* /*
* 1.
* Remove margin from form elements * Remove margin from form elements
* Fixes margin displayed oddly in C10 S5 * Fixes margin displayed oddly in C10 S5
* 2.
* Define vertical-align for form elements
* Fixes alignment in IE and <textarea> alignment in FF3/4
* *
*/ */
@ -235,8 +231,7 @@ button,
input, input,
select, select,
textarea { textarea {
margin: 0; /* 1 */ margin: 0;
vertical-align: baseline; /* 2 */
} }
/* /*
@ -266,13 +261,13 @@ input::-moz-focus-inner {
* Disable default vertical scrollbar for <textarea> element * Disable default vertical scrollbar for <textarea> element
* Fixes scrollbar displayed oddly in IE6/7/8/9 * Fixes scrollbar displayed oddly in IE6/7/8/9
* 2. * 2.
* Align <textarea> with text-top when inline * Align <textarea> with top when inline
* Improves readability and fixes FF3/4 failure to align with baseline * Improves readability and fixes FF3/4's different positioning for baseline
*/ */
textarea { textarea {
overflow: auto; /* 1 */ overflow: auto; /* 1 */
vertical-align: text-top; /* 2 */ vertical-align: top; /* 2 */
} }