Jump to content


Photo

couple errors, needing help


  • Please log in to reply
7 replies to this topic

#1 MoFish

MoFish
  • Members
  • PipPipPip
  • Advanced Member
  • 210 posts

Posted 17 April 2006 - 05:29 PM

hey. I just ran the w3 validator check on my site and have got 4 errors which i cant seem to get rid of. im trying to resolve them but i dont understand exactly how to get rid of them. here is a link to the errors im getting. [a href=\"http://validator.w3.org/check?uri=http%3A%2F%2Fmo.dotgeek.org%2F&charset=%28detect+automatically%29&doctype=Inline\" target=\"_blank\"]click here[/a]. can anyone help me clear them up?

Thanks Again, Mofish

<td width='70%'><a href='index.php?page=viewgallery&amp;category=$category'><b>$category Gallery</b> - Click Here To View</a></td>

<td width='30%' class='right-align'><a href='index.php?page=viewgallery&amp;category=$category'><img src='gallery/tn_$image' /></a></td>


#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 17 April 2006 - 05:45 PM

<div class='random-image'><a HREF='index.php?page=viewgallery&category=Random'><img src='gallery/tn_mr_bean1.jpg' /></a></div>

Change to:
<div class='random-image'><a href='index.php?page=viewgallery&amp;category=Random'><img src='gallery/tn_mr_bean1.jpg' /></a></div>

That should clear all your errors.
Legend has it that reading the manual never killed anyone.
My site

#3 Lorian

Lorian
  • Members
  • PipPip
  • Member
  • 19 posts
  • LocationUnited Kingdom

Posted 17 April 2006 - 05:46 PM

To fix a couple of them, HREF should be replaced by href, and & should be replaced by &amp;

EDIT: Beaten, anyway, you need to put alt="something" in your img tag
Chris Spencer [ aka Lorian ]

[span style=\'font-size:8pt;line-height:100%\']PHP Freaks Community Member
Contact me: corrosivechris (at) gmail d0t com[/span]

#4 MoFish

MoFish
  • Members
  • PipPipPip
  • Advanced Member
  • 210 posts

Posted 17 April 2006 - 06:01 PM

Are you viewing it through the source code? this is the code im trying to play around with. I have href in small, and am using &amp;


echo"<table width='100%' border='0' cellspacing='0'>
<tr>

<td width='70%'><a href='index.php?page=viewgallery&amp;category=$category'><b>$category Gallery</b> - Click Here To View</a></td>
                                         
<td width='30%' class='right-align'><a href='index.php?page=viewgallery&amp;category=$category'><img src='gallery/tn_$image' /></a></td>

</tr>";



#5 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 17 April 2006 - 06:10 PM

The link you gave to the validator output (as well as the online code itself) are both the same. They use HREF (incorrect) and should be href, they have an image alt tag missing, and they pass a parameter in the link using & which needs to be &amp; which is what causes all the errors on line 73.

If you fix those online and revalidate there should not be any errors.


Legend has it that reading the manual never killed anyone.
My site

#6 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 17 April 2006 - 06:12 PM

Are you sure you're looking at the same source that is being validated?

There are no lines in the source being validated that look like the ones you posted.

Ken

#7 MoFish

MoFish
  • Members
  • PipPipPip
  • Advanced Member
  • 210 posts

Posted 17 April 2006 - 06:19 PM

i was looking at the wrong line ;) shhh! dont say a word! i feel stupid enough! down to one error now

Error Line 73, column 126: required attribute "alt" not specified .

<img src='gallery/tn_mr_bean1.jpg' /></a></div>

#8 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 17 April 2006 - 06:26 PM

So add the alt attribute in.
<img src='gallery/tn_mr_bean1.jpg' alt='some discriptive phrase' /></a></div>

Ken




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users