SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Css Help!!!!

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2007
    Location
    Essex, UK
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Css Help!!!!

    I have a little CSS problem. I need my navigation bar butted right up to my header and i can't figure out how to move the bloody thing!! Can anyone help? I have attached an image of my header.......

    Here's the CSS code:

    *{
    padding:0;
    margin:0;
    }

    body{
    background:url(../images/bg.gif) repeat-x #000000;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: white;
    }

    #banner{
    background:url(../images/banner.jpg) no-repeat;
    margin:0 auto;
    padding:0;
    width:850px;
    height:151px;
    clear:both;
    }

    #content{
    background:url(../images/bg.png) no-repeat center;
    width:850px;
    height:541px;
    padding:0;
    margin:0 auto;
    }

    #nav{
    background:url(../images/buttons.png) no-repeat;
    margin:0 auto;
    padding:0 5px 0 5px;
    width:366px; ! *****THIS IS MY NAV BAR***** !
    height:49px;
    z-index:20000;
    clear:both;
    text-align:center;
    line-height:26px;
    }

    Thanks all
    Attached Images Attached Images

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,269
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    HI,

    Your Banners is 151px high and the nav is starting at exactly 151px down the page.

    If you don't want the nav to start at 151px down the page then either reduce the height of the banner to the correct height or if you really need the banner at 151px height then overlay the nav by dragging it upwards upwards with a negative margin.

    Code:
    #nav {margin-top:-18px;position:relative}

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2007
    Location
    Essex, UK
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice one! worked a treat, many thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •