homepage Welcome to WebmasterWorld Guest from 54.227.62.141
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

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

CSS Forum

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




msg:4273539
 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




msg:4273544
 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




msg:4273545
 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:4273549
 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




msg:4273553
 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:4273561
 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




msg:4273574
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved