Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8298255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:42:10+00:00 2026-06-08T15:42:10+00:00

trying to get my first HTML/CSS uni assignment sorted but have become a bit

  • 0

trying to get my first HTML/CSS uni assignment sorted but have become a bit stuck on this. My body tag doesn’t sit at the top of the page. I can ensure it does by giving it a negative margin, but I shouldn’t need to do that, right? Any help would be much appreciated, thanks.

<!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 strict//EN" "http://www.w3.org/TR/xhtml/DTD/xhtml-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PhotArt</title>
<link href="main.css" type="text/css" rel="stylesheet" />
</head>
<body>
<!--begin container -->
<div id="navigationContainer">  

<!-- begin navigation bar -->
     <div id="navigationBar">       
        <ul>
            <li><a class="logo" href="index.html">PhotArt</a></li>
            <li><a class="active" href="index.html">Home</a></li>
            <li><a href="#">Create your art</a></li>
            <li><a href="#">Framing</a></li>
            <li><a href="#">Originals</a></li>
            <li><a href="#">About us</a></li>
            <li><a href="#">Contact us</a></li>
        </ul>

There are a few other paragraphs after this but I doubt the html is causing any issues.

And then the CSS looks like this:

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    border: 0;
}

#navigationContainer {
    background-color: #2f2f38;
    padding: 0;
    margin: 0 auto;
}

#navigationBar {
    padding: 0em 0em 10em 0em;
    background-color: #2f2f38;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

#navigationBar ul {
    margin-left: auto;
    margin-right: auto;
    width: 900px;
    padding: none;
}

#navigationBar li {
    list-style-type: none;
    display: inline;
    font: 1em "Trebuchet MS", Helvetica, sans-serif;
}

#navigationBar .active {
    color: #ffffff;
}

#navigationBar .logo {
    font: 3.5em "Trebuchet MS", Helvetica, sans-serif;
    color: #fcfcfc;
}

#navigationBar li a {
    text-decoration: none;
    color: #a6a4a4;
    margin-right: 30px;
}

#navigationBar li a:hover,
#navigationBar li a:active {
    color: #ffffff;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:42:11+00:00Added an answer on June 8, 2026 at 3:42 pm

    You need to edit your CSS and add margin-top: 0px; to navigation bar:

    #navigationBar ul {
    margin-top: 0px;
    margin-left: auto;
    margin-right: auto;
    width: 900px;
    padding: none;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get the first article on the page using CSS. I have
i'm trying to parse an html page and get the first occurrence of a
First, please see this post on Doctype I've been trying to get an answer
I have special problem which I am trying to solve using CSS. My HTML
I have been messing with this for too long trying to get it to
I'm trying to get the first paragraph height within a div and store it
I am trying to get the first word in the line that matches the
I am trying to get my first button to update a display number in
Ok I am trying to get the users First Name the form gets their
When trying to get geolocation on iPhone the first time - I declined. Every

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.