# Problem with UL tag in my CSS document

**URL:** https://forum.kirupa.com/t/problem-with-ul-tag-in-my-css-document/307484
**Category:** web dev
**Created:** [April 4, 2010, 3:54pm UTC](https://forum.kirupa.com/t/problem-with-ul-tag-in-my-css-document/307484 "2010-04-04T15:54:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nvidia](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@nvidia](https://forum.kirupa.com/u/nvidia)
#### Post date: [April 4, 2010, 3:54pm UTC](https://forum.kirupa.com/t/problem-with-ul-tag-in-my-css-document/307484/1 "2010-04-04T15:54:57Z")

</div>

Hi,

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

```auto

/* homepage_V1.css is used to help build my homepage*/
 body
{
    margin-top: 2em;
    margin-left: 2em;
    
}
div.container
{
    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;
    
}
 

```

homepage\_V1.html

```auto

 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
    <title>Home Page V1</title>
<link rel="stylesheet" type="text/css" href="homepage_V1.css" />
</head>
<body>
    <div class="container">
    <div class="nav">
        <ul>
            <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>
        </ul>
    </div>
    
    </div>
</body>
</html>

 
Thanks
 

```
