0

Have a nice Day,

i tried to use vertical-align property of css in one of my project, but it did not work at all. can anybody tell me how can we use this property properly or any other alternative technique.

thanks in advance

4
Contributors
8
Replies
9
Views
8 Years
Discussion Span
Last Post by MidiMagic
0

Ok in that case it's not vertical-align you need to use. vertical-align will align an elements withing an inline-level or a tabel cell.

eg. If you wanted to align an image above or below a line of text if that image is inline with that text.

I asume you have come accross centering an image horizontialy in css? You would use the same method in vertical alignment.

#blah {
position: relative;
margin-top: auto;
margin-bottom: auto;
// Plus all the other usual ie workarounds etc.
}
0

Do not expect to center things vertically in the browser window. It won't work on all browsers or all screen resolutions.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.