newbie spacing problem ...
Posted: 20 September 2008 08:25 AM   [ Ignore ]
Newbie
Rank
Total Posts:  2
Joined  2008-09-20

Hi all,
Hope I dont bore you with easy questions, but for me its hard enough to cause a few headaches.  Im trying to make a navigation bar, and it worked out okay :
http://www.tremolino.org/navbarTest.html
except for two spacing problems.

the first is the white band about 1em thick ABOVE the navbar.  It should be snug at the top, (margins and padding 0 for body and div navbar)

The second is the height of the navbar,  its too fat at the bottom.  Ideally there should be the same amount of space below as there is above.  I’ve tried commenting out plenty of things, but the problem persists. 

here’s the stylesheet

body {
 margin
0;
 
padding0;
 
font-size95%;
 
font-familyVerdanaArial"sans-serif";
 
color#000;
 
background-color#fff;
}

div
#navbar  {
 
background-color#330000;
 
border-bottom1px solid yellow;
 
coloryellow;
 
font-size80%;
 
margin0;   
 
white-spacenowrap;
 
padding0;
}

#navbar ul {
 
white-spacenowrap;
 
padding.3em;


#navbar #right{
 
floatright;
 
margin-right10px;
}

#navbar ul li {
 
displayinline;
 list-
style-typenone;
}
 
#navbar ul a {
 
padding1px 8px 1px 24px;
 
border1px solid #330000;
 
coloryellow;
 
background-color#330000;
}
 
#navbar ul a:link, #navbar a:visited {
 
text-decorationnone;
}
 
#navbar ul a:hover {
 
border1px solid yellow;
 
color#fff;
}
 
#active a:link, #active a:visited, #active a:hover {
 
border1px solid #333;
 
background-coloryellow;
 
color#000;

thanks in advance!!

Profile
 
 
Posted: 20 September 2008 03:59 PM   [ Ignore ]   [ # 1 ]
Member
Avatar
RankRankRank
Total Posts:  52
Joined  2007-11-08

Well, the spacing problem at the top of your navigation bar is very simple one..just add margin:0; to #navbar ul add 2px padding at the bottom of your #navbar if you feel the spacing at the top and bottom isn’t the same..

All the best

Profile
 
 
Posted: 21 September 2008 07:56 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  2
Joined  2008-09-20

Thanks a lot, that fixes both problems!!!!!  I knew it was something simple :-)

Profile