...

View Full Version : #navbar linking aint working



sejmno
07-12-2011, 05:34 PM
When i try to link my menu to the #navbar in the CSS file, it aint working?
I dont know what ive been doing wrong, can somebody see it? :p


<div id="navbar">
<ul>
<li><a href="sejmno.html" class="current" >Hjem</a></li>
<li><a href="#">Om D-skin</a>
<ul>
<li><a href="opbygning.html">Opbygning</a></li>
<li><a href="#">Anvendelse</a></li>
<li><a href="#">Medarbejdere</a></li>
</ul>
</li>
<li><a href="/faq.php">FAQ</a>
<ul>
<li><a href="#">'FAQ'</a></li>
</ul>
</li>
<li><a href="/contact/contact.php">Kontakt</a></li>
</ul>
</div>




And my css for it:

}

#navbar {
border:none;
border:0px;
margin:0px;
padding:0px;
font: 67.5% "256 Bytes Almindelig", "Agency FB", "Times New Roman";
font-size:20px;
font-weight:bold;
}
#navbar ul{
background:#333333;
height:35px;
list-style:none;
margin:0;
padding:0;
}
#navbar li{
float:left;
padding:0px;
}
#navbar li a{
background:#333333 url("images/seperator.gif") bottom right no-repeat;
color:#cccccc;
display:block;
font-weight:normal;
line-height:35px;
margin:0px;
padding:0px 25px;
text-align:center;
text-decoration:none;
}
#navbar li a:hover, .menu ul li:hover a{
background: #2580a2 url("images/hover.gif") bottom center no-repeat;
color:#000000;
text-decoration:none;
}



#navbar li ul{
background:#333333;
display:none;
height:auto;
padding:0px;
margin:0px;
border:0px;
position:absolute;
width:225px;
z-index:200;
/*top:1em;
/*left:0;*/
}
#navbar li:hover ul{
display:block;

}
#navbar li li {
background:url('images/sub_sep.gif') bottom left no-repeat;
display:block;
float:none;
margin:0px;
padding:0px;
width:225px;
}
#navbar li:hover li a{
background:none;

}
#navbar li ul a{
display:block;
height:35px;
font-size:16px;
font-style:normal;
margin:0px;
padding:0px 10px 0px 15px;
text-align:left;
}
#navbar li ul a:hover, #navbar li ul li:hover a{
background:#2580a2 url('images/hover_sub.gif') center left no-repeat;
border:0px;
color:#ffffff;
text-decoration:none;
}
#navbar p{
clear:left;
}

Hope somebody is able to help at this ;)

xFinaLx
07-12-2011, 05:48 PM
Did you include the css file using something like this?:


<link type="text/css" rel="stylesheet" href="path/to/stylesheet.css">

sejmno
07-12-2011, 05:50 PM
Oh yes, ofcourse::


<link rel="stylesheet" type="text/css" href="../cssfiler/css.css">

teedoff
07-12-2011, 06:04 PM
Oh yes, ofcourse::


<link rel="stylesheet" type="text/css" href="../cssfiler/css.css">

You have a folder named cssFiler? or should it be cssFile?

sejmno
07-12-2011, 06:07 PM
You have a folder named cssFiler? or should it be cssFile?

The Href for the Stylesheet is working, because ive edited alot else, h1,h2,h3, banner etc etc etc.. Its only for the #navbar it aint working.

teedoff
07-12-2011, 06:21 PM
Could you please post ALL your html.

You CSS above validates with no errors. I'd like to see if your mark up validates as well.

sejmno
07-12-2011, 06:25 PM
Here it is. By the way, dont mind about the <br />'s. :)



<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da">


<head>
<link rel="stylesheet" type="text/css" href="../cssfiler/css.css">
<title>D-Skin DK ApS</title>

</head>


<body>
<h5 class="bund">D-Skin Denmark ApS</h5>
<div id="wrapper">
<img id="banner" src="../billeder/banner.jpg">

<div id="navbar">
<ul>
<li><a href="sejmno.html" class="current" >Hjem</a></li>
<li><a href="#">Om D-skin</a>
<ul>
<li><a href="opbygning.html">Opbygning</a></li>
<li><a href="#">Anvendelse</a></li>
<li><a href="#">Medarbejdere</a></li>
</ul>
</li>
<li><a href="/faq.php">FAQ</a>
<ul>
<li><a href="#">'FAQ'</a></li>
</ul>
</li>
<li><a href="/contact/contact.php">Kontakt</a></li>
</ul>
</div>


<h1>Velkommen til D-Skin Danmarks Officielle Hjemmeside</h1>


<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />

<br />
<br />
<br />
<br />
<br />
<br />
<img id="billedmargin" src="../billeder/sidebilled.png" style="opacity:0.1;filter:alpha(opacity=10)">




</body>


</html>

sejmno
07-12-2011, 06:44 PM
Arent you able to help me? I've tried ANYthing, cant find the issue.. :3

sejmno
07-12-2011, 07:07 PM
Ive never tried anything like this.. This worked, when i changed out ID to CLASS???

<div class="menu">
<ul>
<li><a href="#" >Hjem</a></li>
<li><a href="#" id="current">Om D-skin</a>
<ul>
<li><a href="opbygning.html">Opbygning</a></li>
<li><a href="#">Anvendelse</a></li>
<li><a href="#">Medarbejdere</a></li>
</ul>
</li>
<li><a href="/faq.php">FAQ</a>
<ul>
<li><a href="#">'FAQ'</a></li>
</ul>
</li>
<li><a href="/contact/contact.php">Kontakt</a></li>
</ul>
</div>





And then:


.menu {
border:none;
border:0px;
margin:0px;
padding:0px;
font: 67.5% "256 Bytes Almindelig", "Agency FB", "Times New Roman";
font-size:20px;
font-weight:bold;
}
.menu ul{
background:#333333;
height:35px;
list-style:none;
margin:0;
padding:0;
}
.menu li{
float:left;
padding:0px;
}
.menu li a{
background:#333333 url("images/seperator.gif") bottom right no-repeat;
color:#cccccc;
display:block;
font-weight:normal;
line-height:35px;
margin:0px;
padding:0px 25px;
text-align:center;
text-decoration:none;
}
.menu li a:hover, .menu ul li:hover a{
background: #2580a2 url("images/hover.gif") bottom center no-repeat;
color:#000000;
text-decoration:none;
}



.menu li ul{
background:#333333;
display:none;
height:auto;
padding:0px;
margin:0px;
border:0px;
position:absolute;
width:225px;
z-index:200;
/*top:1em;
/*left:0;*/
}
.menu li:hover ul{
display:block;

}
.menu li li {
background:url('images/sub_sep.gif') bottom left no-repeat;
display:block;
float:none;
margin:0px;
padding:0px;
width:225px;
}
.menu li:hover li a{
background:none;

}
.menu li ul a{
display:block;
height:35px;
font-size:16px;
font-style:normal;
margin:0px;
padding:0px 10px 0px 15px;
text-align:left;
}
.menu li ul a:hover, .menu li ul li:hover a{
background:#2580a2 url('images/hover_sub.gif') center left no-repeat;
border:0px;
color:#ffffff;
text-decoration:none;
}
.menu p{
clear:left;
}



But thanks for help anyway. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum