I made this simple pen to explain my problem
https://codepen.io/yonatanmk/pen/VdwGvG
When I place 2 images next to each other with width 50% of the parent they always wind up too wide to be placed side by side and end up stacked on top of each other like block elements.
Why does this happen?
How can I place the 2 images side by side while occupying the full width of the parent div without any space in between them. Having a width of 49% allows the images to be placed side by side but now there's a space between them.
display : inline-block does not seem to help.
Thank you
My code
html
<div>
<img src="http://www.planwallpaper.com/static/images/kitty-cat.jpg" />
<img src="http://www.planwallpaper.com/static/images/kitty-cat.jpg" />
<div>
css
div {
width: 500px;
}
img {
width: 50%;
}