html - Horizontally Align Tworesponsive Images -
still learning responsive web design , ran snag.
is there way can make these 2 linked images horizontally aligned instead of being on top of each other while still maintaining responsiveness? need these images horizontally on same line while still being responsive.
would best have 2 div tags each image? or 2 images in single div? im not sure.
you can see i'm doing jsfiddle.
#header { padding-top: 1%; padding-bottom: .5%; background-color: white; } #header img { display: block; margin-left: auto; margin-right: auto; height: 20%; width: 20%; }
here's fiddle: https://jsfiddle.net/odw3vru8/8/
add:
#header { /* if want center align images horizontally */ text-align:center } #header img { display: inline-block; vertical-align:middle; }
Comments
Post a Comment