Jump to content

Getting validation error


990805

Recommended Posts

Hello,

 

Iam using joomla and iam using a plugin. I validated the page and getting this error:

 

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

 

… class='outside'  style='width:450px;'><span></span><span>Wilt u meer weten ov…

 

 

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

 

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

 

 

This is the code where it has to be wrong:

 

$html2 .= "\n<div class='".(($_cap_pos_)?'inside':'outside')."'  style='width:".$_im_area_."px;'>";if($cur_cap_set){ //captions (specific or default) are set for this  image

$html2 .= "<span>".$cur_cap[0]."</span><span>".$cur_cap[1]."</span>";

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/205681-getting-validation-error/
Share on other sites

<!-- article-content -->

<div class="art-article">

<a name='g_vsig1_0'></a><div class='vsig vsig1_0'>

<div class='vsig_top vsig_top1_0'>

<a href='http://www.dates-online.nl/index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=3&sobi2Id=10&Itemid=' title='Adrienne' target='_blank'>

<img id='topimg1_0' src='http://www.dates-online.nl/images/stories/verysimple18-25/vsig_images/adriennegoed_440_352_90.jpg' title='Adrienne' alt='Adrienne'/>

<div class='outside' style='width:440px;'><span></span><span>Wilt u meer weten over bovenstaande single, of met diegene in contact komen? Klik dan hier of op de foto om direct door te gaan naar haar persoonlijke pagina.</span>

</div><br class='vsig_clr' />

</a>

</div>

<div class='vsig_ruler1_0 vsig_ruler'>

 

<div id="thbvsig_1_0_1" class="vsig_cont vsig_cont1_0"><div class="vsig_thumb"><a href="/naar-leeftijd/18-25-jaar.html?vsig1_0=0" rel="nofollow" onclick='switchimg(vsig_1_0[0],vsig_1_0_b);return false;' title="Adrienne"><img src="http://www.dates-online.nl/images/stories/verysimple18-25/vsig_thumbs/adriennegoed_100_80_80.jpg" alt="Adrienne"/></a></div></div>

<div id="thbvsig_1_0_2" class="vsig_cont vsig_cont1_0"><div class="vsig_thumb"><a href="/naar-leeftijd/18-25-jaar.html?vsig1_0=1" rel="nofollow" onclick='switchimg(vsig_1_0[1],vsig_1_0_b);return false;' title="Arielle"><img src="http://www.dates-online.nl/images/stories/verysimple18-25/vsig_thumbs/arielle1_100_80_80.jpg" alt="Arielle"/></a></div></div>

<div id="thbvsig_1_0_3" class="vsig_cont vsig_cont1_0"><div class="vsig_thumb"><a href="/naar-leeftijd/18-25-jaar.html?vsig1_0=2" rel="nofollow" onclick='switchimg(vsig_1_0[2],vsig_1_0_b);return false;' title="Asley"><img src="http://www.dates-online.nl/images/stories/verysimple18-25/vsig_thumbs/ashley_100_80_80.jpg" alt="Asley"/></a></div></div>

<div id="thbvsig_1_0_4" class="vsig_cont vsig_cont1_0"><div class="vsig_thumb"><a href="/naar-leeftijd/18-25-jaar.html?vsig1_0=3" rel="nofollow" onclick='switchimg(vsig_1_0[3],vsig_1_0_b);return false;' title="Belinda"><img src="http://www.dates-online.nl/images/stories/verysimple18-25/vsig_thumbs/belindagoed_100_80_80.jpg" alt="Belinda"/></a></div></div>

<div id="thbvsig_1_0_5" class="vsig_cont vsig_cont1_0"><div class="vsig_thumb"><a href="/naar-leeftijd/18-25-jaar.html?vsig1_0=4" rel="nofollow" onclick='switchimg(vsig_1_0[4],vsig_1_0_b);return false;' title="Carmen"><img src="http://www.dates-online.nl/images/stories/verysimple18-25/vsig_thumbs/carmengoed_100_80_80.jpg" alt="Carmen"/></a></div></div>

<div id="thbvsig_1_0_6" class="vsig_cont vsig_cont1_0"><div class="vsig_thumb"><a href="/naar-leeftijd/18-25-jaar.html?vsig1_0=5" rel="nofollow" onclick='switchimg(vsig_1_0[5],vsig_1_0_b);return false;' title="Carola"><img src="http://www.dates-online.nl/images/stories/verysimple18-25/vsig_thumbs/carola_100_80_80.jpg" alt="Carola"/></a></div></div>

<div id="thbvsig_1_0_7" class="vsig_cont vsig_cont1_0"><div class="vsig_thumb"><a href="/naar-leeftijd/18-25-jaar.html?vsig1_0=6" rel="nofollow" onclick='switchimg(vsig_1_0[6],vsig_1_0_b);return false;' title="Carol"><img src="http://www.dates-online.nl/images/stories/verysimple18-25/vsig_thumbs/carolgoed_100_80_80.jpg" alt="Carol"/></a></div></div>

<div id="thbvsig_1_0_8" class="vsig_cont vsig_cont1_0"><div class="vsig_thumb"><a href="/naar-leeftijd/18-25-jaar.html?vsig1_0=7" rel="nofollow" onclick='switchimg(vsig_1_0[7],vsig_1_0_b);return false;' title="Dafne"><img src="http://www.dates-online.nl/images/stories/verysimple18-25/vsig_thumbs/dafne_100_80_80.jpg" alt="Dafne"/></a></div></div>

</div>

<div class='vsig_ctrls vsig_ctrls_1_0'><div class='vsig_ctrl_left'></div><div class='vsig_ctrl_right'><a href="/naar-leeftijd/18-25-jaar.html?vsig1_0=32" rel="nofollow" id='bbackvsig_1_0' onclick='switchset("vsig_1_0",32,8);return false;'><img src='http://www.dates-online.nl/plugins/content/plugin_vsig/bwd.png' alt='bwd'/></a>  Set<span id='countervsig_1_0' class='vsig_counter'> 1/5</span>  <a href="/naar-leeftijd/18-25-jaar.html?vsig1_0=8" rel="nofollow" id='bfwdvsig_1_0' onclick='switchset("vsig_1_0",8,8);return false;'><img src='http://www.dates-online.nl/plugins/content/plugin_vsig/fwd.png' alt='fwd'/></a></div></div>

<div class="vsig_clr"></div>

</div>

 

Ok, your problem is here:

 

<a href='#'>
  <img src='#'/>
  <div class='outside' style='width:440px;'>
    <span></span>
    <span>Wilt u meer weten over bovenstaande single, of met diegene in contact komen? Klik dan hier of op de foto om direct door te gaan naar haar persoonlijke pagina.</span>
  </div>
  <br />
</a>

I took out a bunch of IDs and URLs to make it easier to see the problem.

You have a <div> inside an <a> tag. This isn't valid. Divs are block level elements, and <a> tags are inline elements. Block elements inside inline elements are invalid.

You will have to take the div out, or change it to a span or something.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.