Web Hosting Talk







View Full Version : XHTML Check failed!


JustinSmall
04-25-2008, 05:22 PM
Line 71, Column 67: required attribute "alt" not specified.

…/recent.jpg" width="50" height="50" /> <img src="images/recent.jpg" width="50



The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.




this is my code!

<ul>
<li><img src="images/recent.jpg" width="50" height="50" /> <img src="images/recent.jpg" width="50" height="50" /> <img src="images/recent.jpg" width="50" height="50" /></li>
<li><img src="images/recent.jpg" width="50" height="50" /> <img src="images/recent.jpg" width="50" height="50" /> <img src="images/recent.jpg" width="50" height="50" /></li>
</ul>

awatson
04-25-2008, 05:46 PM
So add


alt=""

to each image tag that doesn't have one...

JustinSmall
04-25-2008, 05:50 PM
Wow, I think I just earned my noob rank back lol I learned that mistake a long long time ago lol!

awatson
04-25-2008, 05:51 PM
:) Be glad it's an easy fix!

BetaOrange
04-25-2008, 06:29 PM
All HTML and css are easy fixes.

JustinSmall
04-25-2008, 09:16 PM
speaking of easy stuff in CSS

how do I get something like this...

http://www.brettnyquist.com/images/website.png

to float on the complete top left, like above all other layers?

Jay August
04-26-2008, 05:23 AM
in your CSS, add

.that_image {position: absolute; top: 0; left; 0; z-index: 999;}


and then in your HTML, just below your <body> tag add


<img src="/link/to/image.jpg" alt="" class="that_image" />

JustinSmall
04-26-2008, 11:43 AM
What's the z-index do btw? :D Just out of curiosity...

barat
04-26-2008, 12:31 PM
z-index is something like Layer order in Photoshop ... higher number, the higher the layer is and everything with lower number will be under it :)

JustinSmall
04-26-2008, 01:02 PM
<body>
<img src="images/topleft.gif" alt="" class="top_left_image" />

my css is

.top_left_image {position: absolute; top: 0; left: 0; z-index: 999;}

my outcome is

http://icandydesigns.net/

...............................................

I thought it could be bc of the body... so then I put it at the full top and all the way at the bottom, both dot he same thing.

barat
04-26-2008, 01:46 PM
But when I make view->source, I see tkat You have this image bellow everything in code ... even under html ...

http://img132.imageshack.us/img132/1891/psdtytswn8.png

Place it under body like on example in quotes ...

JustinSmall
04-26-2008, 02:17 PM
I originally put it under the body, as seen in the quotes, then I told you I tried at the top and at the bottom... and nothing was solved.

Jay August
04-27-2008, 11:11 AM
your body seems to have a fixed width. That's bad. Remove the width of the body.