css - How do I vertically center my image? -
css - How do I vertically center my image? -
i have page here - http://click2recycle.ca/. if @ section under headline "free pick , recycling of big quantities of electronics", there image of truck. vertically centered @ midpoint of images on left , right.
i have page here - http://vmmed.com/service/?page_id=7. if @ section under headline "our accreditations , affiliations", see logo organization called auto (the middle logo). not vertically centered @ midpoint of images on left , right despite best efforts.
i have compared css using chrome's inspect element function can't seem find difference.
any thoughts?
a lot of people commenting fixes, think original question asks why 2 different. found same , interested (using chrome) why 2 behaving differently.
first, here differences (using chrome) - i've added reddish border visually show they're not top-aligned.
http://vmmed.com/service/?page_id=7
and http://click2recycle.ca/
now, when view 2 pages in firefox, see:
and
again, both of these firefox , show both top-aligned. what's difference?
that's when noticed inline style
on 1 page (http://click2recycle.ca/) , not on other:
-webkit-box-align: center; -webkit-box-pack: center;
(info box-align here: https://developer.mozilla.org/en-us/docs/web/css/box-align)
and that's why 2 different! (and why it's specific chrome - because of vendor prefix).
hope helps!
css vertical-alignment
Comments
Post a Comment