990805 Posted June 23, 2010 Share Posted June 23, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/205681-getting-validation-error/ Share on other sites More sharing options...
haku Posted June 24, 2010 Share Posted June 24, 2010 You need to show us the HTML output. PHP is irrelevant. Quote Link to comment https://forums.phpfreaks.com/topic/205681-getting-validation-error/#findComment-1076647 Share on other sites More sharing options...
990805 Posted June 24, 2010 Author Share Posted June 24, 2010 <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> Quote Link to comment https://forums.phpfreaks.com/topic/205681-getting-validation-error/#findComment-1076736 Share on other sites More sharing options...
haku Posted June 25, 2010 Share Posted June 25, 2010 Nothing wrong with the code you showed us there. Show us 10-20 lines before that as well. Quote Link to comment https://forums.phpfreaks.com/topic/205681-getting-validation-error/#findComment-1077058 Share on other sites More sharing options...
990805 Posted June 25, 2010 Author Share Posted June 25, 2010 <!-- 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,;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,;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> Quote Link to comment https://forums.phpfreaks.com/topic/205681-getting-validation-error/#findComment-1077072 Share on other sites More sharing options...
haku Posted June 25, 2010 Share Posted June 25, 2010 That's a mess of code. Tell me this, do you have any validation errors coming before that? It may not even be a real error - errors cascade. Other code that comes after an error may not in fact be an error, but the validator is confused because of the previous error. Quote Link to comment https://forums.phpfreaks.com/topic/205681-getting-validation-error/#findComment-1077085 Share on other sites More sharing options...
990805 Posted June 25, 2010 Author Share Posted June 25, 2010 No... Thats the only error... http://validator.w3.org/check?uri=http%3A%2F%2Fwww.dates-online.nl%2Fnaar-leeftijd%2F18-25-jaar.html&charset=%28detect+automatically%29&doctype=Inline&group=1&user-agent=W3C_Validator%2F1.781 Quote Link to comment https://forums.phpfreaks.com/topic/205681-getting-validation-error/#findComment-1077086 Share on other sites More sharing options...
990805 Posted June 25, 2010 Author Share Posted June 25, 2010 Anny help?? Quote Link to comment https://forums.phpfreaks.com/topic/205681-getting-validation-error/#findComment-1077272 Share on other sites More sharing options...
haku Posted June 25, 2010 Share Posted June 25, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/205681-getting-validation-error/#findComment-1077303 Share on other sites More sharing options...
990805 Posted June 25, 2010 Author Share Posted June 25, 2010 Ok! But when i change it in span it will give me alot more errors What do i have to change in this code? $html2 .= "\n<div class='".(($_cap_pos_)?'inside':'outside')."' style='width:".$_im_area_."px;'>"; because this is the php code Quote Link to comment https://forums.phpfreaks.com/topic/205681-getting-validation-error/#findComment-1077315 Share on other sites More sharing options...
990805 Posted June 25, 2010 Author Share Posted June 25, 2010 Haku... Thank you verry much.. I solved the problem.. Thanks to You!!! Thanks You Thank You Thank You Quote Link to comment https://forums.phpfreaks.com/topic/205681-getting-validation-error/#findComment-1077332 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.