This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > HTML authoring > August 2006 > HTML validation issues.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author HTML validation issues.
John Swan

2006-08-02, 12:20 pm

Hello.

I have created a website which does not seem to validate correctly. I am
only getting one error but to rectify this issue would result in part of the
site not working.

Basically I have a div which is nested inside a link. When the validator
parses this it throws an error, having tried different combinations that
does not work. Please check out the other pages on the site to see what I
mean (any opinions would be appreciated :) )

I know there is a easy fix which would be to include the image in the <a>
but that would defeat the point of style sheets and make mobile users of
limited browsers download a big image that would take time and look even
worse.


Please check out www.integrated-dev-sol.co.uk/index.html for more info or
simply click upon the following link:
http://validator.w3.org
and enter the above url.



--
www.integrated-dev-sol.co.uk
Remove 123 from email address to reply.
Anti spam and virus measure.


Adrienne Boswell

2006-08-02, 12:20 pm

Gazing into my crystal ball I observed "John Swan"
<j.a.swan123@ntlworld.com> writing in
news:lMnzg.2841$t%.980@newsfe7-gui.ntli.net:

> Hello.
>
> I have created a website which does not seem to validate correctly. I
> am only getting one error but to rectify this issue would result in
> part of the site not working.
>
> Basically I have a div which is nested inside a link. When the
> validator parses this it throws an error, having tried different
> combinations that does not work. Please check out the other pages on
> the site to see what I mean (any opinions would be appreciated :) )
>
> I know there is a easy fix which would be to include the image in the
> <a> but that would defeat the point of style sheets and make mobile
> users of limited browsers download a big image that would take time
> and look even worse.
>
>
> Please check out www.integrated-dev-sol.co.uk/index.html for more info
> or simply click upon the following link:
> http://validator.w3.org
> and enter the above url.
>
>
>


Why would you nest a div inside of a link - DIV is a block level element,
A is inline and cannot contain block level elements.

If you want A to show as blocklevel, the use CSS to do so.

As to your problem with the image, you could do this:

@media screen {
img.bigimg {display:inline}
}
@media handheld {
img.bigimg {display:none}
}

<a href="page.html"><img src="bigimg.jpg" class="bigimg" alt="Large
image" height="500" width="500"></a>



--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Integrated Development Solutions

2006-08-03, 11:18 pm

Well because the div is just an image. And I thought you could just use that
image to be a linkwhich would then be ignored by browsers that dont support
style sheets.
Obviously this does not.

Thankyou.

"Adrienne Boswell" <arbpen@yahoo.com> wrote in message
news:Xns9812D4183125Farbpenyahoocom@69.28.186.121...
> Gazing into my crystal ball I observed "John Swan"
> <j.a.swan123@ntlworld.com> writing in
> news:lMnzg.2841$t%.980@newsfe7-gui.ntli.net:
>
>
> Why would you nest a div inside of a link - DIV is a block level element,
> A is inline and cannot contain block level elements.
>
> If you want A to show as blocklevel, the use CSS to do so.
>
> As to your problem with the image, you could do this:
>
> @media screen {
> img.bigimg {display:inline}
> }
> @media handheld {
> img.bigimg {display:none}
> }
>
> <a href="page.html"><img src="bigimg.jpg" class="bigimg" alt="Large
> image" height="500" width="500"></a>
>
>
>
> --
> Adrienne Boswell at Home
> Arbpen Web Site Design Services
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share
>



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews