html - Margin-top not working when an image is centered horizontally - Phonegap -
i new webdesign, using phonegap (html5) centered image horizontally way:
.html
<div id="loginholder" > <img id="image_person" src="img/icon_login.png" /> ...
.css
#image_person { display:block; margin-left:auto; margin-right:auto; margin-top: 30px; } ... #loginholder{ background-color: #29aae1; height: 200px; width: 70%; margin: 0 auto; } ...
- please why margin-top not working?
you need trigger layout. add overflow:hidden #loginholder
Comments
Post a Comment