vBulletin Search Engine Optimization
This is a discussion on Do you know how to fix this error? within the Off-Topic & Chit Chat forums, part of the Focus on Members category; [Invalid] Markup Validation of http://malesopranos.com/forums - W3C Markup Validator I had a coder make a 'Latest Videos' module in my ...
| |||||||
Enhancing 80 million pages. | Register | FAQ | Members List | Social Groups | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Do you know how to fix this error? [Invalid] Markup Validation of http://malesopranos.com/forums - W3C Markup Validator I had a coder make a 'Latest Videos' module in my sidebar. However, he made one error ( it says 15 because there are 15 thumbnails. It's not really an error but it makes my site non-xhtml validated everywhere ). I guess it's an easy fix but I know very little about this. Here's the template: HTML Code: <div class="videoBox"> <a href="$tube[link]"><div style="position: relative"><img width="60" height="45" alt="$tube[title]" src="$tube[link1img]" /><div style="position: absolute; width: 60px; height: 60px; top: 0px; left: 0px; background: url(/images/styles/sopranos/style/corners_vid.png) no-repeat;"></div></div></a> </div> |
|
#2
| ||||
| ||||
|
A <div> can't be put inside an anchor <a href="">. So, try this : HTML Code: <div class="videoBox"> <div style="position: relative"> <a href="$tube[link]"> <img width="60" height="45" alt="$tube[title]" src="$tube[link1img]" /> </a> <div style="position:absolute;width:60px;height:60px;top:0px;left:0px; background: url(/images/styles/sopranos/style/corners_vid.png) no-repeat;"> </div> </div> </div> HTML Code: <div class="videoBox"> <a href="$tube[link]"> <img width="60" height="45" alt="$tube[title]" src="$tube[link1img]" /> </a> </div> |
|
#3
| ||||
| ||||
|
yup... you can't put a block-level element (the div) into an inline element (the a) I think the best way to mark that up would be: Code:
<div class="videoBox">
<a href="$tube[link]" class="tubeanchor"><img src="$tube[link1img]" width="60" height="45" alt="$tube[title]" /></a>
</div>
.tubeanchor {
width: 60px;
height: 60px;
background: url(/images/styles/sopranos/style/corners_vid.png) no-repeat;
padding: 7px 0;
margin: 0;
border: 0;
}
untested- might need a tweak. |
|
#4
| |||
| |||
|
Thanks to both of you Brian's solution would probably be cleanest if it'd work but for some reason the corners weren't smooth with it. The solution below ( Shadab's first solution ) seems to work perfectly but I'd still like to use Brian's if he can figure out what's wrong with it since it's a bit cleaner. HTML Code: <div class="videoBox"> <div style="position: relative"> <a href="$tube[link]"> <img width="60" height="45" alt="$tube[title]" src="$tube[link1img]" /> </a> <div style="position:absolute;width:60px;height:60px;top:0px;left:0px; background: url(/images/styles/sopranos/style/corners_vid.png) no-repeat;"> </div> </div> </div> |
|
#5
| |||
| |||
|
Apparently, this solution above doesn't really work. it removes the link on the image, making it the thumbnails quite useless. I'm quite surprised I just noticed this now. Any suggestions?
|
|
#6
| |||
| |||
|
Any way to remove the error without removing any functionality?
|
|
#7
| |||
| |||
|
Last try |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING | muhakeme | Türkçe | 9 | 09-15-2008 02:05 PM |
| [Error] xhtml coding error on my part - please help | jbartle | Template Modifications | 3 | 01-24-2008 11:50 PM |
| Internal Server error - Log error posted here | candg | Troubleshooting | 2 | 08-06-2007 06:46 AM |
| vBSEO error in error log | Mert Gökçeimam | Troubleshooting | 5 | 02-26-2007 11:41 AM |