Problem with UL tag in my CSS document


i am trying to create a navigation bar using the UL element tag, i’ve created my links fine, but whenever i click on my links, it some how pushes my page downwards. Can somebody tell me why it does this please.


/* homepage_V1.css is used to help build my homepage*/

    margin-top: 2em;
    margin-left: 2em;
    margin-bottom: 1em;


    width: 80em;
    border: solid #9400D3 0.1em;
    height: 40em;
    padding-left: 1em;
    padding-top: 1em;
    padding-bottom: 1em;

 div.nav ul
    list-style-type: none;


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html lang="en">
    <title>Home Page V1</title>
<link rel="stylesheet" type="text/css" href="homepage_V1.css" />
    <div class="container">
    <div class="nav">
            <li><a href="#Home" id="Home" name="Home"> Home </a></li>
            <li><a href="#News" id="Contact" name="Contact"> Contact </a></li>
            <li><a href="#News" id="News" name="News"> News </a></li>
            <li><a href="#About" id="About" name="About"> About </a></li>


Hi, you are using internal linking. When you click a link it will try and scroll down to the ID that it matches. If you used a different URL you’d probably see it fixed (untested)

Or…do whatevery ou want. You kmnow the issue now :slight_smile: