Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a table that contains a form, in the left col is the name of the field, and i would like to set the text to the top of the td, as at the moment the text is at the bottom.

Does any one know why this is a hit and miss element attribute?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
923 views
Welcome To Ask or Share your Answers For Others

1 Answer

Firstly,

You shouldn't really be using tables for layout (even for forms) you should use divs and CSS: how to make full height cell in full height table in Internet Explorer

Secondly,

valign was deprecated, we now use the css property vertical-align see why not to use valign: http://phrogz.net/css/vertical-align/index.html

HMTL:

<div class="className">Blah</div>

CSS:

.className {
   vertical-align: middle;
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...