HighDots Forums  

HTML validation issues.

alt.html.writers alt.html.writers


Discuss HTML validation issues. in the alt.html.writers forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John Swan
 
Posts: n/a

Default HTML validation issues. - 07-31-2006 , 08:41 AM






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.



Reply With Quote
  #2  
Old   
Adrienne Boswell
 
Posts: n/a

Default Re: HTML validation issues. - 08-01-2006 , 10:51 PM






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

Quote:
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



Reply With Quote
  #3  
Old   
Integrated Development Solutions
 
Posts: n/a

Default Re: HTML validation issues. - 08-03-2006 , 11:47 AM



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 (AT) yahoo (DOT) com> wrote

Quote:
Gazing into my crystal ball I observed "John Swan"
j.a.swan123 (AT) ntlworld (DOT) com> writing in
news:lMnzg.2841$t%.980 (AT) newsfe7-gui (DOT) 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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.