Div class failing to validate

This is a discussion on "Div class failing to validate" within the Web Page Design section. This forum, and the thread "Div class failing to validate are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 8th, 2007, 13:27
New Member
Join Date: May 2007
Location: Lincoln (UK)
Age: 39
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Div class failing to validate

Hi all, just having fun trying to validating a testpage page, I have a page with various sets of links to other sites on, I have surrounded blocks of the links with a box around them using the div class="blahblahblah" element but it keeps throwing errors at me no matter how I try and handle it.

As far as I can see and from research, div is the correct element to use as it is an area, as oppssed to a single block (in which case the span element would be used) class too is used as the sub-element as it is not unique and it is used more than once, is this the correct way of thinking??

Validation from W3C informs me of the following:

Quote:
Error Line 51 column 16: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
<div class="box">
Validation from WDG informs me of the following:
Quote:
<div class="box">

Error: element div not allowed here; possible cause is an inline element containing a block-level element
Heres the page im trying to validate - http://www.thunderbyte.co.uk/testsheet.html
Any pointers/help welcome
Reply With Quote

  #2 (permalink)  
Old May 8th, 2007, 13:47
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Div class failing to validate

You can't have a block element (<div class="bax">) in an inline element (<p>)

Code: Select all
<p>Here I have placed various bookmarks of general interest creating in effect, a mini site directory. Please note that this site is UK based and links to shops are all UK based . All links will open up in a new tab/window.

<span class="bar"><strong>Shops (UK):</strong></span>
<div class="box">
You should be closing the </p> before you open that div.
Reply With Quote
  #3 (permalink)  
Old May 8th, 2007, 14:02
New Member
Join Date: May 2007
Location: Lincoln (UK)
Age: 39
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Div class failing to validate

Many thanks for that, worked a treat! I was too busy looking through the blocks of links for the culprit instead of the rest of the sheet.
Reply With Quote
Reply

Tags
class, div, validation error

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Validate Form Class soloam JavaScript Forum 2 Nov 28th, 2007 14:51
[SOLVED] div class and div id danny322 Web Page Design 1 Nov 22nd, 2007 12:52
Why should I validate CSS? spinal007 Web Page Design 13 May 11th, 2007 14:24
array of class janper Flash & Multimedia Forum 4 Apr 9th, 2007 13:54


All times are GMT. The time now is 16:19.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43