Validation Error and Weblog Formatting Problem
Posted: 26 April 2008 09:27 AM   [ Ignore ]  
Grad Student
Rank
Total Posts:  70
Joined  11-04-2006

Okay, I’m stuck again. The code validates and renders just fine in Dreamweaver CS3, but I’m getting validation error

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

at W3C. Here’s the code area in question as entered into the EE weblog Publish area, and it’s entered as its own paragraph:

Speaking of web sites, I'm also rebuilding our company site to more modern standards, and I thought I'd take a second to once more state how much I love CSS.
<
div class="centered"><a href="http://bp0.blogger.com/_nRpFSePUDBk/SAy4YGz2SNI/AAAAAAAAAQk/LWWJRZD1JEM/s1600-h/css.png"><img src="http://bp0.blogger.com/_nRpFSePUDBk/SAy4YGz2SNI/AAAAAAAAAQk/LWWJRZD1JEM/s400/css.png" alt="image of css" /></a></div>
This new designing has led me to another crossroads, though: specifying font size.

Upon viewing the rendered source code, EE’s weblog formats the above like this:

<p>
Speaking of web sites, I&#8217;m also rebuilding our company site to more modern standards, and I thought I&#8217;d take a second to once more state how much I love CSS.
<br />
<
div class="centered"><a href="http://bp0.blogger.com/_nRpFSePUDBk/SAy4YGz2SNI/AAAAAAAAAQk/LWWJRZD1JEM/s1600-h/css.png"><img src="http://bp0.blogger.com/_nRpFSePUDBk/SAy4YGz2SNI/AAAAAAAAAQk/LWWJRZD1JEM/s400/css.png" alt="image of css" /></a></div>
<
br />
This new designing has led me to another crossroads, though: specifying font size.
</
p>

The validator is flagging “<div class=“centered”><a href=“http://bp0.blogger.com/...”, but I’m not seeing my div inside a block-level tag. All that EE is doing that Dreamweaver isn’t is adding the <br /> before and after the div class.

Any ideas?

 Signature 

maurymccown.commy photos

Profile
 
 
Posted: 26 April 2008 10:20 AM   [ Ignore ]   [ # 1 ]  
Lab Assistant
RankRank
Total Posts:  284
Joined  06-20-2005

The block level tag referred to is the paragraph tag that surrounds all the content. I recommend that you install the Textile plugin. That will allow you do this sort of content formatting whilst remaining valid.

Cheers

Dry

 Signature 

   Purple Dogfish | Member of EE Pro Network

Profile
 
 
Posted: 26 April 2008 10:44 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  70
Joined  11-04-2006

Hm. I’m guessing there’s no way to just turn off the automatic <p> inserts?

 Signature 

maurymccown.commy photos

Profile
 
 
Posted: 26 April 2008 10:47 AM   [ Ignore ]   [ # 3 ]  
Lab Assistant
RankRank
Total Posts:  284
Joined  06-20-2005

Yes there is. In your custom field setup change the type from XHTML to Auto BR or none.

Dry

 Signature 

   Purple Dogfish | Member of EE Pro Network

Profile
 
 
Posted: 26 April 2008 10:56 AM   [ Ignore ]   [ # 4 ]  
Grad Student
Rank
Total Posts:  70
Joined  11-04-2006

Ahhh, SWEET! Thanks for the help!

 Signature 

maurymccown.commy photos

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64914 Total Logged-in Users: 22
Total Topics: 81869 Total Anonymous Users: 9
Total Replies: 440134 Total Guests: 185
Total Posts: 522003    
Members ( View Memberlist )
Newest Members:  smilepolitelyrvmcleodbjmohrAqua193Bios Elementmjpoteetguimogranwelshmrcfthenetmonkey