I want to end up with:
Hello there!
This is an image
Hi!
Where the image and the text This is an image are centered on the page. How do I accomplish this with Markdown?
Edit: Note that I'm looking to horizontally center the image and text on the page.
解决方案
You need a block container with a defined height, same value for line-height and image with vertical-align:middle;
It should work.
Hello there !
This is an image
Hi !
#container {
height:100px;
line-height:100px;
}
#container img {
vertical-align:middle;
max-height:100%;
}