How can I reduce the space between navigation bar and a title?
This is my template for blog posts. When the window you are viewing the post in is maximized, the spacing between nav
and post-title
is far too much. I want to reduce the space and keep it consistent.
CSS – A shifts down when a margin is added to a child element
I have a <section>
with a background color, and this element is entirely covered by a translucent <div>
. Within the <div>
, I have a paragraph with a top margin. Here’s my code:
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?