Summary: For a quick solution, just click on the image at the bottom.
Greetings to everyone!
I am facing an issue with two <div>
elements that I need to separate using a
<hr class="separator">
element.
Below is the CSS code for the
<hr class="separator">
element:
hr.separator {
border-top: 1px solid black;
margin-top: 70px;
margin-bottom: 0;
padding: 0;
}
And here is the CSS code for the lower
<div class="brown">
element:
div.brown{
margin-top: 0;
padding-top: 70px;
background-color: #ce9771;
}
In the HTML structure, these elements are arranged like this:
<div>
upper div \<div>
<hr>
<div>
bottom div \<div>
However, there seems to be a small vertical whitespace (approximately 3px) between them. I have tried setting all margins and padding to "0", experimented with making the <hr>
a child of each <div>
, and even adjusted the position attribute (which unfortunately resulted in the <hr>
disappearing)... Can anyone provide guidance to a beginner?