The HTML and CSS 'float' property [duplicate]

0 votes
asked Sep 13, 2017 by poseidonofsea

This question already has an answer here:

  • How do you keep parents of floated elements from collapsing? [duplicate] 16 answers

1 Answer

–1 vote
answered Mar 12, 2018 by camille-v

Edit :Ok I saw your website now, one solution is to add a <div class="clearfix"> after the h3 element. Then you style this div:

.clearfix{ clear: both;
}

First answer:If I understand your problem, you just want your white background covering your header. Since your header is position: relative, the code below should work :

header div{ background-color: rgba(255,255,255,0.80) position: absolute; top: 0; bottom: 0; right: 0; left: 0;
}

It simply set your white layer to position:absolute and stretch it to cover the container block, which is your header ;)

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter

...