Relative Content

Tag Archive for htmlcssmargin

Margin-right of a flex div not respected on narrow-width viewports

I have an image and a <p> inside a <div class = "man"> with display: flex. When I try to resize the window with the dev tools, the margin-right of the div colored with orange in the image is not respected, so the image seems stuck to the right side. The image for now has no padding/margin, but there is a margin applied to the div that contains both the <p> and the <img>; why is it not respected?

Margin-right of a flex div not respected on narrow-width viewports

I have an image and a <p> inside a <div class = "man"> with display: flex. When I try to resize the window with the dev tools, the margin-right of the div colored with orange in the image is not respected, so the image seems stuck to the right side. The image for now has no padding/margin, but there is a margin applied to the div that contains both the <p> and the <img>; why is it not respected?