Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Mon Nov 23, 2009 12:36 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ]  Bookmark and Share
Author Message
 Post subject: List items inside a span are casuing me validation problems.
PostPosted: Thu Feb 26, 2009 4:05 pm 
Offline
User avatar

Joined: Sun Mar 02, 2008 6:21 am
Posts: 22
Location: USA, Michigan
Hi every one I have a quick question. I'm building and interface this is make of unordered list items. Those list items are contained in a span so that interface can have separate look for the other links on the page.

But when I validate my page in Dreamweaver I get some page errors that.

Here is the error:

[COLOR="Red"]The tag:"span" is not allowed within: "ul" It is only allowed within: a, abbr, acronym, address, b, bdo, big, button, caption, cite, code, dd, del, dfn, div, dt, em, fieldset, h1, h2, h3, h4, h5, h6. . ..[XHTML 1.0 strict][/COLOR]

Now here is the code in question:
[HTML]
<ul id="nav">
<span class="left_links">
<li class="nav_items_00"><a href="index.html">Home</a></li>
<li class="nav_items_00"><a href="services.html">Services</a></li>
<li class="nav_items_00"><a href="gallery.html">Gallery</a></li>
<li class="nav_items_00"><a href="events.html">Events</a></li>
<li class="nav_items_00"><a href="http://hsgsphoto.wordpress.com/" target="_blank">Blog</a></li>
<li class="nav_items_00"><a href="about.html">About</a></li>
</span>
[/HTML]
The page that you can see this code in action is located at:

[url="http://www.hsgsphoto.com"]http://www.hsgsphoto.com[/url]

I guess my question is what would be the best practice in this situation. I need the a way to tell this group of links to act different then links in other parts of the page but the error I'm getting in validation is that list items (li) tags are not to be used within a span.

Thank you so much for any feed back and help

John

_________________
JT


Top
 Profile  
 
 Post subject: Re: List items inside a span are casuing me validation problems.
PostPosted: Thu Feb 26, 2009 4:21 pm 
Offline
500+ Club
User avatar

Joined: Wed Feb 27, 2008 6:14 am
Posts: 929
Location: Cebu City Philippines
In the "ul" element, it is only the "li" element that are allowed to descend right next to it.

So, what you're doing is invalid and will never pass validation.

_________________
~ Get me some work, I do freelancing ~


Top
 Profile  
 
 Post subject: Re: List items inside a span are casuing me validation problems.
PostPosted: Thu Feb 26, 2009 8:23 pm 
Offline
100+ Club
User avatar

Joined: Tue Jan 06, 2009 5:14 pm
Posts: 124
Location: Minneapolis, MN
Go to your css and copy all your attributes from the nav_items_00 class and paste them into the left_links (delete the attributes that are duplicates). Then just write your code like this:

[HTML]
<ul id="nav">
<li class="left_links"><a href="index.html">Home</a></li>
<li class="left_links"><a href="services.html">Services</a></li>
<li class="left_links"><a href="gallery.html">Gallery</a></li>
<li class="left_links"><a href="events.html">Events</a></li>
<li class="left_links"><a href="http://hsgsphoto.wordpress.com/" target="_blank">Blog</a></li>
<li class="nav_items_00"><a href="about.html">About</a></li>
</ul>
[/HTML]

is that what you are looking for?


Top
 Profile  
 
 Post subject: Re: List items inside a span are casuing me validation problems.
PostPosted: Thu Feb 26, 2009 10:24 pm 
Offline
User avatar

Joined: Sun Mar 02, 2008 6:21 am
Posts: 22
Location: USA, Michigan
If I delete the attributes:

Code:
.left_links a:link {
   color: #c0c0c0;
   text-decoration:none;   
}
.left_links a:visited {
   color: #c0c0c0;
   text-decoration:none;
}
.left_links a:active {
   color: #c0c0c0;
   text-decoration:none;   
}
.left_links a:hover {
   color: white;
   background-color:#C62F2A;
   text-decoration:underline;
   display:block;
}


then how am I going to get the interface to work when people scroll over it? I'm not sure what your gunning for in your response?

_________________
JT


Top
 Profile  
 
 Post subject: Re: List items inside a span are casuing me validation problems.
PostPosted: Fri Feb 27, 2009 5:43 pm 
Offline
100+ Club
User avatar

Joined: Tue Jan 06, 2009 5:14 pm
Posts: 124
Location: Minneapolis, MN
you want to keep the ones that you have already in your left_links class. The deleting of attributes will only be done after you copy all the attributes over from your other class (nav_items_00). Only delete attributes if you have duplicates like they both have a color attribute, but you want to keep your left links one.

Made up Example:


.left_links a:link {
color: #c0c0c0;
text-decoration:none;
}

.nav_items_00 a:link {
color: #999999
text-decoration:none;
font-size: 10px;
}

*now COPY the nav_items attributes and paste into left_links (Don't cut, because you want to keep your other attributes where they are)

.left_links a:link {
color: #c0c0c0;
text-decoration:none;
color: #999999
text-decoration:none;
font-size: 10px;
}

.nav_items_00 a:link {
color: #999999
text-decoration:none;
font-size: 10px;
}


*Now delete the duplicates that you don't need

.left_links a:link {
color: #c0c0c0;
text-decoration:none;
font-size: 10px;
}

.nav_items_00 a:link {
color: #999999
text-decoration:none;
font-size: 10px;
}

That is what I was talking about doing. Maybe I didn't understand your question correctly, but this is what i believe my solution would be if I have the problem right.


Top
 Profile  
 
 Post subject: Re: List items inside a span are casuing me validation problems.
PostPosted: Sat Feb 28, 2009 12:42 am 
Offline
User avatar

Joined: Sun Mar 02, 2008 6:21 am
Posts: 22
Location: USA, Michigan
Thx you I will give it a try and see how it turns out thx you for the extra clarification.

John

_________________
JT


Top
 Profile  
 
 Post subject: Re: List items inside a span are casuing me validation problems.
PostPosted: Sat Feb 28, 2009 3:31 pm 
Offline
100+ Club
User avatar

Joined: Tue Jan 06, 2009 5:14 pm
Posts: 124
Location: Minneapolis, MN
No prob. Hope it works out.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley