css - Div is slightly off center -
i tried center div horizontal , vertical on screen, somehow off center. why that? think because of content, don't know :d
i used
height:90%;
and
margin-top:5%
to center it.
here's full code: http://jsfiddle.net/7mnue/1/
cleaned markup bit, , applied display: flex
in parent div.container
(see links below, specially), , used center
flex css properties.
.container { display: flex; justify-content: center; align-items: center; } .inlineflex { display: inline-flex; }
you may face problems in ie10 , below, other browsers (see caniuse link)
references:
Comments
Post a Comment