# CSS List / pading / margin problem

**URL:** https://forum.kirupa.com/t/css-list-pading-margin-problem/265695
**Category:** Uncategorized
**Created:** [July 11, 2008, 12:30pm UTC](https://forum.kirupa.com/t/css-list-pading-margin-problem/265695 "2008-07-11T12:30:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Pug](https://avatars.discourse-cdn.com/v4/letter/p/51bf81/32.png) [@Pug](https://forum.kirupa.com/u/Pug)
#### Post date: [July 11, 2008, 12:30pm UTC](https://forum.kirupa.com/t/css-list-pading-margin-problem/265695/1 "2008-07-11T12:30:31Z")

</div>

Hi all,

I hoped you could help. I’ve been baffeling over this probelm for a while now.

Basically I have a gap inbetween my tabbed navigation and my sub navigation, i’ve check every other  
div and it seems to be the list within the subnav div that is causing the problem, but i have no idea why it is doing it.

I’ve checked all padding / margin and even tried negative margins but nothing seems to help.

If anyone could be of any help that would be fantastic.

Cheers,

Tom.

```auto

/*------------------ Sub Navigation Links */

#subnav { 

    background-image: url(../images/muf-img-subnav.gif);
    background-color: #f9c823;
    width: 900px; height: 31px;    
    padding: 0 0 0 0;
    margin: 0 0 0 0;
    
    }

#subnavlinks ul {

    
    list-style: none;
    overflow: auto;
    padding: 0 0 0 0;
    margin: 0 0 0 0;

    
}

#subnavlinks li {
    
    display: block;
    list-style: none;
    border-right: #e09d21 1px solid;
    float: left;
    padding 0 0 0 0;
    margin: 0 0 0 0;

}

#subnavlinks li.last {

border-right: #e09d21 1px solid;

}

#subnavlinks li.first {

padding: 0; margin: 0 0 0 0;
border-left: #e09d21 1px solid;

}

#subnavlinks li a {
        
    display: block;
    color: #ffffff;
    font-size: 12px;
    padding: 8px 10px 8px 10px;
    margin: 0 0 0 0;
    text-decoration: none;
}

#subnavlinks li a:hover {
        
    background: url(../images/muf-img-over-subnav.png);

}

/*--------IE 6 HACK --->

* html #subnavlinks li a { width: 100% );

```

---

<div class="post-metadata">

### Author: ![pixelSnobbery](https://avatars.discourse-cdn.com/v4/letter/p/e274bd/32.png) [@pixelSnobbery](https://forum.kirupa.com/u/pixelSnobbery)
#### Post date: [July 11, 2008, 1:09pm UTC](https://forum.kirupa.com/t/css-list-pading-margin-problem/265695/2 "2008-07-11T13:09:59Z")

</div>

Which browser is this happening with? Have you tried using a negative margin-top for the subNav?

---

<div class="post-metadata">

### Author: ![Pug](https://avatars.discourse-cdn.com/v4/letter/p/51bf81/32.png) [@Pug](https://forum.kirupa.com/u/Pug)
#### Post date: [July 11, 2008, 1:20pm UTC](https://forum.kirupa.com/t/css-list-pading-margin-problem/265695/3 "2008-07-11T13:20:41Z")

</div>

it’s happening in firefox 3.0,

negative top margin within the SubNav div worked a treat, thanks. but it’s now pushed the list over to the right when it should be floating to the left. :S mad.
