Hey there!
I am trying to have sections fit the whole page but there is still a margin despite me setting padding/margin to 0 both in the body and section parts. Can anyone help please? https://codepen.io/bensrd/pen/wrZrRo?editors=1100
Hey there!
I am trying to have sections fit the whole page but there is still a margin despite me setting padding/margin to 0 both in the body and section parts. Can anyone help please? https://codepen.io/bensrd/pen/wrZrRo?editors=1100
class .container-fluid, which wraps whole your page, has 15px padding on both sides.
set .container-fluid to padding:0 and h1 tag to margin-top:0
Hope it helps
Thanks Junaid07 ! Now I still have the margin appearing despite the margin-top:0 setting
add margin-top:0 to h1 tag
h1{
margin-top:0;
}
It works wonders! Thank you so much
By default html sets margin top and bottom to all heading tags(Block level element). remove them and use padding instead.
Hope it helps
So this means h1-h6 all include this behavior?
yes even paragraph tags, Create a helper class for e,g
.no-padding{
padding:0;
}
and add this class whenever its needed.
Great, thanks for the advice!