homepage Welcome to WebmasterWorld Guest from 54.166.53.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
ERROR - document type does not allow element "div" here;
SpeedwayNative



 
Msg#: 4273537 posted 9:19 pm on Feb 27, 2011 (gmt 0)

I am getting the following error in an definition list on W3C, and I can't figure out what I'm doing wrong. I have tried many different combinations. Can someone pls help, thanks!

Error:

document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

Code:

<dt><div class="category"> Full Service Facility </div></dt>
<dd>Veterinarians and staff are on duty 24 hours a day, 7 days a week.</dd>

 

SevenCubed

WebmasterWorld Senior Member



 
Msg#: 4273537 posted 9:30 pm on Feb 27, 2011 (gmt 0)

<div class="category">
<dl>
<dt>Full Service Facility</dt>
<dd>Veterinarians and staff are on duty 24 hours a day, 7 days a week.</dd>
</dl>
</div>

SevenCubed

WebmasterWorld Senior Member



 
Msg#: 4273537 posted 9:33 pm on Feb 27, 2011 (gmt 0)

Sorry I jumbled your original class a bit but that will give you the clue you need. And welcome to Webmaster World.

SpeedwayNative



 
Msg#: 4273537 posted 9:37 pm on Feb 27, 2011 (gmt 0)

Yea, I tried that. It results in the text (<dd>) "Veterinarians and staff are on duty 24 hours a day, 7 days a week." coming out the same color and font weight as the <dt> I want the <dt> to carry the "category" rules, but not the <dd>

SevenCubed

WebmasterWorld Senior Member



 
Msg#: 4273537 posted 9:43 pm on Feb 27, 2011 (gmt 0)

Then have the class "category" style you dt instead of your div
<div class="some_other_category">
<dl>
<dt class="category">Full Service Facility</dt>
<dd>Veterinarians and staff are on duty 24 hours a day, 7 days a week.</dd>
</dl>
</div>

SpeedwayNative



 
Msg#: 4273537 posted 9:56 pm on Feb 27, 2011 (gmt 0)

1st off Seven, right on for the Welcome!

Also, thanks for the help. I have been working on this project for almost 24 straight hours(not this particular issue), starting to get delirious ;) Didn't even need the div, I just <dt class="category">Full Service Facility</dt>, and it's exaclty what I wanted!

Looks like I found my "Web" forum :D

caribguy

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4273537 posted 10:22 pm on Feb 27, 2011 (gmt 0)

The theory behind the validation error is that you can't have a block element <div> inside of an inline element <dt>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved