I’ve been asking Chat GPT about this and it tells me that the Content div should be placed below the Header div, which is what I want.
.header {
position: fixed;
}
<div class="header">Header</div>
<div class="content">Content</div>
But both locally and in several online HTML editors, the Content div is placed on top of the Header div.
Is Chat GPT stupid, or am I stupid (probably)?
2
Answers
Its just behind your header. See the changes.
Positioning a DiV below a fixed Div is done by making its position absolute.
I hope you got the answer by now.