ARTICLE AD BOX
The text which I expected to appear below the header instead starts at the top of the page. Why?
It's simply because of
.divContent { position: fixed; top: 40px;You told it exactly where to be on the page. Where everything else is placed is irrelevant to that. If you don't want it there then you have to change the fixed position, or change your approach.
One solution is just to push it down by the expected height of the header:
.divContent { position: fixed; top: 320px;Demo:
Note this might not be perfect as you're expressing absolute font sizes and allowing those bits to overflow their own containers. A bigger rethink might be sensible but this answers your immediate questions.
P.S. As an aside, the <center> tag is deprecated and should not be used anymore
I'd also advise against doing things like putting some style attributes directly on elements (like you have with the body tag). It'll be easier to manage your code and trace problems if you keep all the style rules in the CSS block rather than scattering it across different parts of the code.
63.2k18 gold badges97 silver badges105 bronze badges
If you prefer position to be fixed, then you can apply a top that places it below the header and a left to place it in the middle using calc.
81.6k42 gold badges124 silver badges237 bronze badges
Explore related questions
See similar questions with these tags.
