I'm new to html/css and I've just started wrapping my head around positioning but I seem to have a misunderstanding. Right now I'm trying to create a page header with a horizontal divider right below it. My header is positioned absolutely, with a top and left value of 0, and a height of 88. I thought that if I gave my horizontal divider position: relative, and a height of 5, it would end up right below my header. Instead, it's ending up at the very top of the page, and I'm confused as to why.
I would like to use this horizontal divider again on my page, right above my footer, so I don't want to give this horizontal divider position: absolute and top: 88px. Any help is appreciated, thanks so much!
My (very simple) code so far:
<div id="header"></div> <div class="horizontal-divider"></div> #header { position: absolute; top: 0px; left: 0px; height: 88px; width: 100%; } .horizontal-divider { position: relative; height: 5px; width: 100%; top: 0px; background-color: white; border: 1px solid black; }