Welcome to WebmasterWorld Guest from 54.166.87.123

Forum Moderators: incrediBILL

Message Too Old, No Replies

DIV resulting in parse error

can't get it to validate

   
9:49 pm on Apr 4, 2010 (gmt 0)

5+ Year Member



Helo,
my css documents doesnt validate.I want to center my aligned menubar, but I cant select my UL. It returns a parse error, I tried allot of things but nothing helped, can you help me out? Do you see the answer to my question?






my html:

<div id="header">
<div id="logo">

<img src="./Image/0526_brick_003.jpg" width="800" height="200" alt="specifics removed" /> </div>
<div id="navigatie"> [b]<ul id="list">[/b]
<li id="nav1"><a href="../Home.html">Home</a></li>
|<li id="nav2"><a href="../contact.html">Contact</a></li>
|<li id="nav3"><a href="../projecten.html">Projecten</a></li>
|<li id="nav4"><a href="../partners.html">Partners</a></li>
</ul>
</div> <!--EINDE NAVIGATIE-->
</div> <!--EINDE HEADER-->



my css:
#list{
border:4px solid #000000;
margin:0;
list-style-type:none;
background-color:#5A585D;
width:50%;
display: block;
text-align:center;
}

#navigatie li {
margin-bottom:2px;
background-color:#5A585D;
display: inline-block;
text-align:center;
}
#navigatie a{
display:block;
color:#fff;
background-color:#AF0000;
padding:2px;
text-decoration:none;
}
#navigatie a.hier{
background-color:#5A585D;
color:#333;
}
#navigatie a:hover {
background-color:#999;
color:#fff;
}

[edited by: incrediBILL at 10:07 pm (utc) on Apr 4, 2010]
[edit reason] removed specifics, see TOS #13 [webmasterworld.com...] [/edit]

1:51 pm on Apr 5, 2010 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



You are including the | character outside of the <li></li> tags, which is not valid. <ul> can only contain <li></li> nodes, it can't contain text nodes.
10:38 pm on Apr 5, 2010 (gmt 0)

5+ Year Member



i removed them,but the same error keeps on returning, my html-code validated but my css did not..
12:20 am on Apr 6, 2010 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



What is the validation error?
12:38 am on Apr 12, 2010 (gmt 0)

5+ Year Member



parse error on #list

if I change #list to #ul it gaves same error
12:31 pm on Apr 12, 2010 (gmt 0)

5+ Year Member



I pasted your code in at the w3.org validator (http://jigsaw.w3.org/css-validator/validator) and it said that it was valid. What is telling you that it's invalid?