Question:
CSS, Position: absolute; vertical-align:middle; valign="middle" ?
SUPRAJA
2010-10-05 03:00:30 UTC
I didn't specify the top or bottom because I want the "CIRCLE" to be in the middle. How can i do it? vertical-align:middle; valign="middle", doesn't work for absolute positioning.

so how can i have "CIRCLE" to have the text from the top to middle and be in the left to center of div?

.circle{
position:absolute; vertical-align:middle; left:0;
}

Four answers:
Gabbo93
2010-10-05 03:16:06 UTC
Well vertical-align won't work because that is only for tables. I would try add a padding to the div, the best way to center it would be to specify a height and then work out what the center of the would be and use that for padding-top.
ebhagavan
2010-10-05 23:47:45 UTC
here is a way to div valign middle

http://www.templatespoint.com/blog/2010/10/div-vertical-align-middle/
Khalid Al-mutawa
2010-10-05 03:35:33 UTC
vertical-align: middle



works if you specify a line-height property
Erika
2016-11-03 08:21:53 UTC
i like Lemon. that's not basically my popular scent. that's my popular colour too. each time I yet cleansing factors or and air freshener, that's lemon/citrus scented. that's humorous using fact my mom hates the scent and my dad isn't prepared on it the two. bypass parent?


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...