Need Help Shifting Nav Bar Up Towards Header DIV
Posted: 25 November 2010 09:49 PM   [ Ignore ]
Newbie
Rank
Total Posts:  1
Joined  2010-11-25

Hello everyone,

I’ve validated both my HTML and CSS, but can’t figure out how to shift my nav bar up so that it butts against the bottom of my header DIV (containing the wheat field image).

View my test site here.

My CSS is below.  I’m not sure if the problem lies in my NAV DIV or the unordered list inside the NAV DIV.

Any tips would be much appreciated.

Thank you very much.

ubuntucss

__________________________________________________

body {
    
        background
-color#996; /* light khaki */
        
font-familyArialVerdanaGeorgia;
        
font-size12pt;
        
color#000; /* black */
        
margin0;
        
padding0;
}

#wrapper {
        
width960px;
        
background-color#90BD90; /* spruce */
        
margin0 auto;
        
border-left1px solid #ccc;
        
border-right1px solid #ccc;
}

#header {
        
background-imageurl('wheatfield.jpg');
        
background-repeat:no-repeat;
        
width960px;
        
height135px;
        
margin0;
        
border-bottom1px solid #ccc;
        
border-top1px solid #ccc;
}

#nav {
        
background-color#FFFF00; /* yellow */
        
width960px;
        
height2px;
}

#nav ul {
        
padding-left0;
        
margin-left0;
        
background-color#036;
        
color#fff;
        
floatleft;
        
width100%;
        
font-familyarialhelveticasans-serif;
}


#nav ul li {
        
displayinline;
}    

#nav ul li a {
    
padding0.2em 1em;
    
background-color#036;
    
color#fff;
    
text-decorationnone;
    
floatleft;
    
border-right1px solid #fff;    
}




ul 
#navlist 
{
    margin
-left0;
    
padding-left0;
    
white-spacenowrap;

}

#navlist li
{
    display
inline;
    list-
style-typenone;

}

#navlist a { padding: 6px 10px; }

#navlist a:link, #navlist a:visited
{
    color
#fff;
    
background-color#036;
    
text-decorationnone;
}

#navlist a:hover
{
    color
#fff;
    
background-color#369;
    
text-decorationnone;
}


#content {
        
background-color#D41B6A; /* cherry */
        
width675px;
        
floatleft;
        
padding5px;
}


#content img {
        
margin10px;
}

#sidebar {
        
background-color#F3F1C2; /* light wheat */
        
width200px;
        
floatright;
        
margin-bottom25px;
}

#sidebar a {
        
text-decorationnone;
}

#sidebar h3 {
        
margin-left10px;
}

#sidebar a:link {
        
color#104F9F; /* royal blue */
        
text-decorationnone;
}

#sidebar a:visited {
    
color#EF1818; /* red */
    
text-decorationnone;
}

#sidebar a:hover {
    
color#FFB073; /* flat orange */
    
text-decorationnone;
}

#sidebar a:active {
    
color#62914C; /* olive green */
    
text-decorationnone;
}


#sidebar li {
        
list-stylenone;
}

#footer {
        
background-color#BEBD77; /* khaki */
        
clearboth;
        
width960px;
        
height135px;
        
border-top1px solid #ccc;
        
border-bottom1px solid #ccc;
}

#footer p {
        
padding10px;
}

#footer img {
    
bordernone;    
    
margin-left10pt;
}

.leftfloat {
        float
left;
        
margin:0 5px 0 0;
}    

.rightfloat {
        float
right;
        
margin:0 0 5px 0;
Profile
 
 
Posted: 08 December 2010 10:16 AM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  4
Joined  2010-12-07

#nav ul {
      position:relative;
      top:-20px
      padding-left: 0;
      margin-left: 0;
      background-color: #036;
      color: #fff;
      float: left;
      width: 100%;
      font-family: arial, helvetica, sans-serif;

try these changes. tell me if it works.

_____________________
Blendtec Review

Profile