Vertical align image in unordered list in Opera and Google Chrome

Mistercheese

New Member
In the example of the following code,\[code\]<html><head><style>.gallery li { border: 1px dotted black; width:100px; height:100px; float:left; list-style:none; margin:10px; text-align:center; line-height:100px; vertical-align:middle;}</style></head><body><ul class="gallery"> <li> <img src="http://dummyimage.com/20x20/000/000000.png" /> </li></ul></body></html>\[/code\]I found that, only Firefox can make it vertically center. While Opera and Chromium (Google Chrome) cannot do so. Is there anyway to solve this in Opera and Chromium?
 
Back
Top