PDA

View Full Version : Validate this code please..


gamerzhut
08-10-2011, 03:50 PM
Hi, these 2 lines throws errors, when i try to validate on a validator.



<div style="color:black; font-family:Franklin Gothic Medium; text-shadow:1px 1px 1px transparent; font-style:oblique; text-decoration:overline; padding:1px; font-weight:900;" class="smallfont">{vb:raw post.usertitle}</div>

Also this
<vb:if condition="$post['field8']"><div class="Bold" style="color:black; text-shadow:1px 1px 1px transparent; padding:1px; font-weight:900;"><dt>Gender</dt> </div> <dd>{vb:raw post.field8}</dd></vb:if>


Any help would be appreciated, cheers :)

Lynne
08-10-2011, 03:52 PM
What are the errors you get?

gamerzhut
08-10-2011, 04:17 PM
https://vborg.vbsupport.ru/external/2011/08/49.jpg

If the image is not clear, let me know :)

Lynne
08-10-2011, 04:52 PM
The image is clear, but the errors are spelled out right there. You can't have a <b> around a <div>. You can't put a <div> around a <dt> (<dt> must be enclosed in <dl> tags).

gamerzhut
08-10-2011, 05:20 PM
The image is clear, but the errors are spelled out right there. You can't have a <b> around a <div>. You can't put a <div> around a <dt> (<dt> must be enclosed in <dl> tags).

Yeah, thanks!! I tried adding & removing them but failed. It resulted in new errors :/

Can you just validate for the lines which i have posted above?

Many thanks.

Lynne
08-11-2011, 01:55 AM
You should just change this to span tags and put them inside the <dt> tags:
<vb:if condition="$post['field8']"><dt><span class="Bold" style="color:black; text-shadow:1px 1px 1px transparent; padding:1px; font-weight:900;"> Gender</span></dt> <dd>{vb:raw post.field8}</dd></vb:if>
You can try changing the other to <span> tags also.