content overlapping with flexbox header - how to avoid - html

CSS styles for my menu bar
* {
margin: 0;
padding: 0;
}
body {
background: white;
font-family: 'Helvetica Neue', Helvetica;
font-weight: 400;
font-size: 1.05em;
line-height: 1.6rem;
color: white;
font-size: 1.2em;
}
header {
position: fixed;
background: #d777ea; /*light purple*/
width: 100%;
display: block;
}
header > nav > ul {
display: flex;
margin: 0;
padding: 0;
justify-content: flex-start;
list-style: none;
flex-wrap: wrap;
}
header > nav > ul > li {
margin: 0;
flex: 0 1 auto;
position: relative;
transition: 0.2s;
cursor: pointer;
}
header > nav > ul > li:hover {
background: #aa64e0; /*dark purple*/
}
header > nav > ul > li > ul {
/* dropdown */
position: absolute;
background: #76a1e8; /*light blue*/
display: none;
list-style-type: none;
margin: 0;
padding: 0;
}
header > nav > ul > li:hover > ul {
/* dropdown */
display: block;
width: 220px;
}
header > nav > ul > li > a {
color: white;
display: flex;
font-size: 1.5rem;
text-decoration: none;
padding: 1rem 1.5rem;
letter-spacing: 1px;
}
header > nav > ul > li > ul > li {
display: block;
}
header > nav > ul > li > ul > li > a {
text-decoration: none;
color: white;
display: flex;
letter-spacing: 1px;
cursor: pointer;
padding: .25rem 1.5rem;
}
header > nav > ul > li > ul > li:hover {
background: blue;
}
header > nav > ul > li > a > i {
margin-left: 5px;
}
input {
padding: .25rem;
width: 100px;
}
input:invalid {
border: 2px solid red;
}
header > nav > ul > li > ul > li > input:invalid + button {
background: red;
cursor: not-allowed;
}
button {
padding: .25rem;
}
HTML header and an image
<header>
<nav>
<ul>
<li>Teams<i class="fas fa-caret-down"></i>
<ul>
<li><a class="preset-id" data-schoolid=13318>Huron</a> </li>
<li><a class="preset-id" data-schoolid=99999>Pioneer</a></li>
<li>
<input type="number" min="1" max="100000" class="custom-id-value" placeholder="School ID #" required>
<button class="custom-id"> Go </button>
</a>
</li>
</ul>
</li>
<li><a class="show-calendar">Calendar</a></li>
<li><a class="show-athletes">Athletes</a></li>
</ul>
</nav>
</header>
<main>
<image src="https://www.w3schools.com/w3css/img_lights.jpg"></image>
</main>
When it shows up,
The content is on top of the header bar. Is there some way to avoid this? and have the content displayed below? When the dropdown is activated, I don't want the content below it to move though.
JsFiddle: https://jsfiddle.net/g870xy3d/36/

You just need to add a margin top in the main tag with the height of the header. Also add top:0 to the header:
header{
top:0;
position: fixed;
background: #d777ea; /*light purple*/
width: 100%;
display: block;
}
main{
margin-top: 57px;
}

Related

How to get a border on top of another border in css?

I'm trying to create a navigation bar, where by default it has a border-top of a certain color, and when either hovered or active, I wanted another color to go on top of it.
Is there any method that I can make this to work?
I've tried:
absolute
z-index
but neither works for me.
.navbar {
background-color: #ecf0f1;
}
.navbar > .main-nav > ul,li {
list-style-type: none;
text-decoration: none;
}
.navbar > .main-nav > ul {
min-height: 60px;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #ecf0f1;
border-top: 5px solid #d1d064;
box-sizing:border-box;
}
.navbar > .main-nav > ul > li {
text-align: center;
min-width: 150px;
}
.navbar > .main-nav > ul > li > a {
display: block;
color: #737373;
text-align: center;
padding: 20px 16px;
text-decoration: none;
font-family: 'Lato', sans-serif;
font-weight: 800;
}
.navbar > .main-nav > ul > li.active {
border-top: thick solid #0F9E5E;
}
.navbar > .main-nav {
max-width: 1480px;
margin: 0 auto;
}
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/hover.css/2.1.0/css/hover-min.css" rel="stylesheet">
</head>
<nav class="navbar">
<div class="main-nav">
<ul>
<li class="active hvr-sweep-to-top">Home</li>
<li class="hvr-overline-from-center">Second</li>
<li class="hvr-overline-from-center">Third</li>
</ul>
</div>
</nav>
EDIT: Accidentally attached the wrong code in, I've fixed it now.
If you add a border to the li which is transparent, then change its color based on being active or hovered
Note, I cleaned up your code some, and remove the margin-top: -5px; on your li since it was hiding the first items top border
.navbar {
background-color: #ecf0f1;
}
.navbar > .main-nav > ul,
li {
list-style-type: none;
text-decoration: none;
}
.navbar > .main-nav > ul {
min-height: 60px;
margin: 0;
padding: 0;
overflow: hidden;
box-sizing: border-box;
}
.navbar > .main-nav > ul > li {
border-top: thick solid transparent;
text-align: center;
min-width: 150px;
}
.navbar > .main-nav > ul > li a {
display: block;
color: #737373;
text-align: center;
padding: 20px 16px;
text-decoration: none;
font-family: 'Lato', sans-serif;
font-weight: 800;
}
.navbar > .main-nav > ul > li.active {
border-top-color: #0F9E5E;
}
.navbar > .main-nav > ul > li:hover {
border-top-color: #fff;
}
.navbar > .main-nav {
max-width: 1480px;
margin: 0 auto;
}
<nav class="navbar">
<div class="main-nav">
<ul>
<li class="active">Home
</li>
<li>Second
</li>
<li>Third
</li>
</ul>
</div>
</nav>
Try using box-shadow
Either default or inset
Example:
box-shadow: 0 -10px 0 0 red;
or
box-shadow: inset 0 -10px 0 0 red;
or a combination
box-shadow: 0 -10px 0 0 red, 10px 0 0 blue, inset 10px 0 0 green;
Combined with border, you should get the desired effect.
Remove margin-top and add !important for the border style on elements li.active and li:hover
check this snippet
.navbar {
background-color: #ecf0f1;
}
.navbar > .main-nav > ul,
li {
list-style-type: none;
text-decoration: none;
}
.navbar > .main-nav > ul {
padding-top: 1px;
min-height: 60px;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #ecf0f1;
border-top: 7px solid #d1cf82;
box-sizing: border-box;
z-index: -1;
}
.navbar > .main-nav > ul > li {
text-align: center;
min-width: 150px;
}
.navbar > .main-nav > ul > li > a {
display: block;
color: #737373;
text-align: center;
padding: 20px 16px;
text-decoration: none;
font-family: 'Lato', sans-serif;
font-weight: 800;
}
.navbar > .main-nav > ul > li.active {
border-top: thick solid #0F9E5E !important;
box-sizing: border-box;
z-index: 1;
}
.navbar > .main-nav > ul > li:hover {
border-top: thick solid #fff !important;
}
.navbar > .main-nav {
max-width: 1480px;
margin: 0 auto;
}
<nav class="navbar">
<div class="main-nav">
<ul>
<li class="active">Home
</li>
<li>Second
</li>
<li>Third
</li>
</ul>
</div>
</nav>
Hope it helps
.navbar {
background-color: #ecf0f1;
}
.navbar > .main-nav > ul,
li {
list-style-type: none;
text-decoration: none;
}
.navbar > .main-nav > ul {
padding-top: 1px;
min-height: 60px;
margin: 0;
padding: 0;
background-color: #ecf0f1;
border-top: 7px solid #d1cf82;
box-sizing: border-box;
z-index: -1;
}
.navbar > .main-nav > ul > li {
text-align: center;
min-width: 150px;
}
.navbar > .main-nav > ul > li > a {
display: block;
color: #737373;
text-align: center;
padding: 20px 16px;
text-decoration: none;
font-family: 'Lato', sans-serif;
font-weight: 800;
}
.navbar > .main-nav > ul > li{
border-top:7px solid red;
position:relative;
}
.navbar > .main-nav > ul > li:hover:before, .navbar > .main-nav > ul > li.active:before{
content:'';
position:absolute;
width:100%;
top: -14px;
left:0;
border-top:7px solid green;
}
.navbar > .main-nav {
max-width: 1480px;
margin: 0 auto;
}
<nav class="navbar">
<div class="main-nav">
<ul>
<li class="active">Home
</li>
<li>Second
</li>
<li>Third
</li>
</ul>
</div>
</nav>
Instead of making your <li> tags .active, you can style <a> tags to take whole space of their parents and put (active) border on it. Then on :hover, put another border on <li> tag - it will make it appear on top. To avoid size jumping, give your <li> some transparent border, of the same size as the one you give on :hover
a {
display: block;
width: 100%;
height: 100%;
}
a.active {
border-top: thick solid #0F9E5E;
}
li {
border-top: thick solid transparent;
}
li:hover, li:active {
border-top: thick solid red; // color of your choice
}

Main navigation active when submenu opened CSS

I am trying to make the main menu active (background color same sub menu background color), so the when submenu is opened the main menu color becomes active, I tried to make it but not working, Can anyone please look in to it whats wrong with my css?
JSfiddle demo
nav {
float: left;
width: 100%;
background: #6c9d1c;
border-bottom: 5px solid #e57817;
font-family: 'MyriadPro-Regular';
}
nav > ul {
list-style: none;
margin: 0;
padding: 0;
font-size: 0;
text-align: center;
}
nav > ul > li {
list-style: none;
padding: 0;
margin: 0;
position: relative;
display: inline-block;
}
nav > ul > li > a {
color: #fff;
text-decoration: none;
font-size: 16px;
text-transform: uppercase;
padding: 7px 17px 3px 17px;
font-weight: 700;
display: block;
line-height: normal;
}
nav > ul > li > a:hover {
background-color: #e57817;
color: #fff;
text-decoration: none;
}
nav > ul > li > ul {
list-style: none;
padding: 0;
margin: 0;
display: none;
position: absolute;
left: 0;
top: 30px;
width: 100%;
text-align: left;
}
nav > ul > li:hover ul {
display: block;
}
/*main menu active on submenu open*/
nav > ul > li > ul > li > a:hover nav > ul > li > a:hover {
background-color: #e57817;
}
/*Submenu*/
nav > ul > li > ul > li {
padding: 0;
margin: 0;
list-style: none;
display: block;
}
nav > ul > li > ul > li > a {
display: block;
background: #e57817;
color: #fff;
font-size: 14px;
font-family: Arial;
border-bottom: 1px solid #fcb65a;
padding: 8px 20px;
}
nav > ul > li > ul > li > a:hover {
background-color: #fcb65a;
color: #fff;
text-decoration: none;
}
<nav>
<ul>
<li>Main Menu
<ul>
<li>Submenu one</li>
<li>Sub Menu Two</li>
</ul>
</li>
</ul>
</nav>
You are using the :hover selector on <a> which means that when the cursor is moved over the <ul> the text in <a> is no longer hovered. The <ul> is still part of its parent <li> though so change:
nav > ul > li > a:hover {
to
nav > ul > li:hover {
Here's an updated fiddle: https://jsfiddle.net/nc5yqah9/2/

Centering the text inside the navigation box

I'm working on a navigation menu and right now I'm trying to center the text both horizontally and vertically inside the boxes.
Here is how my navigation looks like right now:
Here is how I want it to be:
This is my code (I'm using Umbraco):
#inherits Umbraco.Web.Mvc.UmbracoTemplatePage
#{ var home = CurrentPage.Site(); }
#if (home.Children.Any())
{
// Get the first page in the children
var naviLevel = home.Children.First().Level;
// Add in level for a CSS hook
<ul class="meny level-#naviLevel">
// For each child page under the home node
#foreach (var childPage in home.Children)
{
if (childPage.Children.Any())
{
<li class="dropdown has-child #(childPage.IsAncestorOrSelf(CurrentPage) ? "selected" : null)">
#if (childPage.DocumentTypeAlias == "Huvudmeny")
{
<span>#childPage.Name</span>
#childPages(childPage.Children)
}
else
{
#childPage.Name
}
#helper childPages(dynamic pages)
{
// Ensure that we have a collection of pages
if (pages.Any())
{
// Get the first page in pages and get the level
var naviLevel = pages.First().Level;
// Add in level for a CSS hook
<ul class="meny dropdown-menu sublevel level-#(naviLevel)">
#foreach (var page in pages)
{
<li>
#page.Name
//if the current page has any children
#if (page.Children.Any())
{
// Call our helper to display the children
#childPages(page.Children)
}
</li>
}
</ul>
}
}
</li>
}
else
{
<li class="#(childPage.IsAncestorOrSelf(CurrentPage) ? "selected" : null)">
#childPage.Name
</li>
}
}
</ul>
}
css:
nav {
z-index: 999;
background: rgba(0, 0, 0, 0.95);
text-align: right;
left: 0px;
right: 0px;
display: block;
position: relative;
transition: height 300ms ease-in-out;
text-align:center;
}
nav > ul {
padding: 5px;
position: relative;
display: inline-table;
width: 100%;
}
nav > ul li {
position: relative;
font-family: "Lato", sans-serif;
}
.nav a {
display: inline-block;
}
nav > ul li a,
nav > ul li span {
cursor: pointer;
display: inline-block;
padding: 40px;
padding-top: 5px;
font-size: 20px;
font-weight: 500;
color: #000000;
border-right: 1px solid #000000;
}
nav > ul li a:hover,
nav > ul li span:hover {
color: #0066FF;
}
nav > ul li span {
cursor: default;
}
nav > ul li:after {
content: "";
clear: both;
display: block;
}
nav > ul li.selected > a,
nav > ul li.selected span {
color: #000000;
font-weight: 700;
}
nav li > ul {
position: absolute;
}
nav li > ul li {
float: none;
display: block;
position: relative;
}
nav li > ul li a {
font-size: 17px;
padding: 15px 15px;
font-weight: 500;
color: rgba(255, 255, 255, 0.8);
}
nav li > ul li a:hover {
color: #fff;
}
nav li > ul > li > ul {
left: 100%;
top: 0;
display: none;
}
nav {
margin: 0 auto;
background: none;
width: 100%;
}
nav > ul {
padding-right: 0;
width: auto;
text-align: center;
}
nav > ul li {
float: left;
}
nav > ul li a,
nav > ul li span {
font-size: 15px;
}
nav > ul li:last-child a {
padding-right: 0;
}
nav li > ul {
left: 0;
top: 75%;
display: none;
white-space: nowrap;
height: auto;
margin-bottom: 0;
margin-left: 10px;
text-align: left;
background: rgba(0, 0, 0, 0.8);
padding: 5px 8px 5px 0;
}
nav li > ul li a {
padding: 8px 15px;
font-size: 15px;
color: rgba(255, 255, 255, 0.8);
}
You should remove the padding-top and decrease the padding from the
nav > ul li a, nav > ul li span.
nav > ul li a, nav > ul li span {
cursor: pointer;
display: inline-block;
padding: 14px; /* decrease padding */
/* padding-top: 5px; */
font-size: 20px;
font-weight: 500;
color: #000000;
border-right: 1px solid #000000;
}
You can use this css to make layout as per reference image(you need to change height and font-size and color as per your design)
nav > ul li {
background: #fff none repeat scroll 0 0;
color: #000;
font-size: 18px;
margin: 0;
text-align: center;
padding: 0 15px;
height: 30px;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
-webkit-flex-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
justify-content: center;
}

List items to be same width with background image

Any suggestions for this one?
I've added a background image of an arrow for any list item that has a drop down with the class of 'dropable' now because of this the list items are no longer evenly spaced to account for the added arrow, any suggestion on how to solve this as had no success so far.
CodePen: http://codepen.io/nickelse/pen/GJezQX?editors=110
HTML:
<div class="wrapper">
<div class="container">
<nav>
<ul class="clearfix">
<li>Home</li>
<li class="dropable">WordPress
<!-- First Tier Drop Down -->
<ul>
<li>Themes</li>
<li>Plugins</li>
<li>Tutorials</li>
</ul>
</li>
<li class="dropable">Web Design
<!-- First Tier Drop Down -->
<ul>
<li>Resources</li>
<li>Links</li>
<li>Tutorials</li>
</ul>
</li>
<li>Graphic Design</li>
<li>Inspiration</li>
<li>Contact</li>
<li>About</li>
</ul>
</nav>
</div>
</div>
CSS:
/* CSS Document */
#import url(http://fonts.googleapis.com/css?family=Open+Sans);
#import url(http://fonts.googleapis.com/css?family=Bree+Serif);
body {
background: #212121;
font-family: 'Open Sans', sans-serif;
margin: 0;
}
.wrapper {
background: #454545;
border-bottom: 3px solid #666;
width: 100%;
}
.container {
margin: 0 auto;
width: 1000px;
}
nav {
margin: 0;
font-size: 0;
text-align: center;
}
nav ul {
padding: 0;
margin: 0;
list-style: none;
position: relative;
}
nav ul li {
margin: 0px;
display: inline-block;
}
nav a {
display: block;
padding: 0 20px;
color: #fff;
font-size: 14px;
line-height: 56px;
text-decoration: none;
}
nav a:hover {
background-color: #000000;
}
nav > ul > li {
background: url(http://i.imgur.com/ijNENpN.png) no-repeat left 50%;
}
nav > ul > li:first-child {
background: none;
}
nav li:hover + li {
background-image: none;
}
nav > ul > li:hover > a {
background-color: #666;
}
nav ul li:hover > ul {
display: block;
text-align: left;
}
nav ul ul {
display: none;
position: absolute;
top: 56px;
background-color: #666;
}
nav ul ul li {
border-top: 1px solid #454545;
width: 270px;
float: none;
display: list-item;
position: relative;
}
nav ul ul li:first-child {
border-top: none;
}
nav ul ul li a {
line-height: 42px;
}
nav li.dropable a {
background: url(http://i.imgur.com/5Clqhz5.png) no-repeat 93% center;
}
nav li.dropable li a {
background-image: none;
}
nav li.dropable li a:hover {
background: #333;
}
/*
li > a:after { content: ' +'; }
li > a:only-child:after { content: ''; }
*/
Cheers
Nick
Instead of using images for caret, I would suggest using fonts from font-awesome.
This works pretty good
/* CSS Document */
#import url(http://fonts.googleapis.com/css?family=Open+Sans);
#import url(http://fonts.googleapis.com/css?family=Bree+Serif);
body {
background: #212121;
font-family: 'Open Sans', sans-serif;
margin: 0;
}
.wrapper {
background: #454545;
border-bottom: 3px solid #666;
width: 100%;
}
.container {
margin: 0 auto;
width: 1000px;
}
nav {
margin: 0;
font-size: 0;
text-align: center;
}
nav ul {
padding: 0;
margin: 0;
list-style: none;
position: relative;
}
nav ul li {
margin: 0px;
display: inline-block;
}
nav a {
display: block;
padding: 0 20px;
color: #fff;
font-size: 14px;
line-height: 56px;
text-decoration: none;
}
nav a:hover {
background-color: #000000;
}
nav > ul > li {
background: url(http://i.imgur.com/ijNENpN.png) no-repeat left 50%;
}
nav > ul > li:first-child {
background: none;
}
nav li:hover + li {
background-image: none;
}
nav > ul > li:hover > a {
background-color: #666;
}
nav ul li:hover > ul {
display: block;
text-align: left;
}
nav ul ul {
display: none;
position: absolute;
top: 56px;
background-color: #666;
}
nav ul ul li {
border-top: 1px solid #454545;
width: 270px;
float: none;
display: list-item;
position: relative;
}
nav ul ul li:first-child {
border-top: none;
}
nav ul ul li a {
line-height: 42px;
}
nav ul > li.dropable > a:after {
/* display:inline;
content: "\00a0\00a0\00a0\00a0";*/
/* background:url(http://i.imgur.com/5Clqhz5.png) no-repeat center center;*/
}
nav li.dropable li a {
background-image: none;
}
nav li.dropable li a:hover {
background: #333;
}
/*
li > a:after { content: ' +'; }
li > a:only-child:after { content: ''; }
*/
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<div class="wrapper">
<div class="container">
<nav>
<ul class="clearfix">
<li>Home</li>
<li class="dropable">WordPress <i class="fa fa-caret-down"></i>
<!-- First Tier Drop Down -->
<ul>
<li>Themes</li>
<li>Plugins</li>
<li>Tutorials</li>
</ul>
</li>
<li class="dropable">Web Design <i class="fa fa-caret-down"></i>
<!-- First Tier Drop Down -->
<ul>
<li>Resources</li>
<li>Links</li>
<li>Tutorials</li>
</ul>
</li>
<li>Graphic Design</li>
<li>Inspiration</li>
<li>Contact</li>
<li>About</li>
</ul>
</nav>
</div>
</div>
I would take advantage of the :after pseudo class in CSS. The margins become evenly spaced and you forgo having to put the image into the navigation unnecessarily.
CodePen
nav ul > li.dropable > a:after {
display:inline;
content: "\00a0\00a0\00a0\00a0";
background:url(http://i.imgur.com/5Clqhz5.png) no-repeat center center;
}
Figured it out, cheers anyway.
I did this:
nav li.dropable a {
background: url(http://i.imgur.com/5Clqhz5.png) no-repeat right 20px center ;
padding-right: 34px;
}

Navigation Menu with multiple colored tabs - How to change CSS

I'm trying to get my navigation menu figured out but I'm not sure what I'm doing wrong. I'm trying to give each menu item it's own background color, which I've done successfully, but I can't get the colors to space out correctly. I got a background going through the whole thing (the green and gray in between the menu items) but I'm not sure how to translate that into the menu items auto scaling to match the 940px nav. bar...
Here is a link: www.pancakeweb.com/preschool/test.html
CSS:
#header .navigation {
padding: 0 5px;
width: 940px;
}
#header .navigation > ul:before, #header .navigation > ul:after {
content: "";
display: table;
}
#header .navigation > ul:after {
clear: both;
}
#header .navigation > ul {
background: url(../images/bg-navigation.gif) repeat-x bottom left;
margin: 0;
padding: 0;
}
#header .navigation > ul .link1 {
background: url(../images/bg-navigationb.gif) repeat-x bottom left;
}
#header .navigation > ul .link2 {
background: url(../images/bg-navigationo.gif) repeat-x bottom left;
}
#header .navigation > ul .link3 {
background: url(../images/bg-navigationr.gif) repeat-x bottom left;
}
#header .navigation > ul .link4 {
background: url(../images/bg-navigationg.gif) repeat-x bottom left;
}
#header .navigation > ul > li {
display: block;
float: left;
list-style: none;
margin: 0 35px;
position: relative;
padding: 0;
}
#header .navigation > ul > li > a {
color: #fff;
display: block;
font-family: 'Lato-Light';
font-size: 14px;
font-weight: normal;
height: 52px;
line-height: 56px;
margin: 0;
padding: 0 8px;
text-align: center;
text-transform: uppercase;
text-decoration: none;
}
#header .navigation > ul > li.selected > a {
font-family: 'Lato-Black';
}
#header .navigation > ul > li > a:hover {
color: #e2e2e2;
}
#header .navigation > ul > li.booking > a {
color: #fcac00;
font-family: 'Lato-Black';
}
#header .navigation > ul > li.booking > a:hover {
color: #f3be4b;
}
#header .navigation ul ul {
left: -99999px;
margin: 0;
padding: 0;
position: absolute;
top: 52px;
z-index: 5;
}
#header .navigation > ul > li:hover ul {
left: 0;
}
#header .navigation ul ul li {
border-top: 1px solid #fff;
display: block;
list-style: none;
margin: 0;
padding: 0;
width: 180px;
}
#header .navigation ul ul li:first-child {
border: 0;
}
#header .navigation ul ul li a {
background: #e9e9e9;
color: #000000;
display: block;
height: 23px;
font-family: 'Lato-Light';
font-size: 13px;
font-weight: normal;
line-height: 23px;
margin: 0;
padding: 0 15px;
text-decoration: none;
text-transform: capitalize;
}
#header .navigation ul ul li a:hover {
background: #fcac00;
color: #fff;
}
HTML:
<div class="navigation">
<ul>
<li class="link1">
home
</li>
<li class="link2">
About
</li>
<li class="link3">
admissions
</li>
<li class="link4">
Teachers
</li>
<li class="link1">
Kindergarten
<ul>
<li>
After School Programs
</li>
<li>
Spring Break Camps
</li>
<li>
Summer Camps
</li>
</ul>
</li>
<li class="link2">
Contact
<ul>
<li>
Visiting Sudbury
</li>
<li>
Map & Directions
</li>
<li class="selected">
Giving to Sudbury
</li>
</ul>
</li>
</ul>
</div>
</div>
It looks like this is what you want to change:
#header .navigation > ul > li {
display: block;
float: left;
list-style: none;
margin: 0;
position: relative;
padding: 0 35px;
}
I replaced the 35px side-margins with padding.