Search code examples
htmlcsspositioningcss-positionspacing

CSS, HTML issue. How would I get the main body of the document to be a certain way down from the top?


Basically I have a navbar and a title, that both have the properties, position: fixed; top: (VALUE I INSERTED); My problem is that obviously when I write the main body of the document the text is underneath the title/navbar. I need to get the text to be underneath the title and navbar, but without it having a fixed position. If any more information with code is needed, just comment saying so. Thanks in advance.


Solution

  • apply to your main content area

    #content {
        margin-top: YOUR HEADER HEIGHT
    }