I have a doubt and it is that how can I align two images horizontally since I have been testing it and I can't find a way to do it, if someone can help me I would appreciate it
#foto{
max-width: 55%;
height: auto;
margin: 20px;
padding: 5px;
display: block;
margin: auto;
}
#foto2{
max-width: 55%;
height: auto;
margin: 20px;
padding: 5px;
display: block;
margin: auto;
}
You just have to use the property
display: flex
on the<div>
one that contains your two images.EDIT
Added margin to the right of the first image.
To begin with I think you shouldn't use
max-width : 55%
it because if both images reached that max, that would add up to more than 100%, so one image would then be passed down.To place an image side by side just put
display: inline-bloc
you can use the grid property just like flex: example with grid:
Here the link to codepen
Example with flex
link here