Reputation Activity
-
Les Mac reacted to iKane in Browser MysteryYes, do this you would use this code:
<!--[if lt IE 8]>
<link rel="stylesheet" type="text/css" href="pathToIE7Stylesheet.css" />
<![end if]-->
That will target anything before IE8. Take out the lt to make it specifically for 7 and so on.
Place this directly after any other CSS sheets, this also means that you don't have to restyle each element all over again, just overwrite whatever property isn't working/needs to be added.
Hope that makes sense.
-
Les Mac got a reaction from Beavy in Active LinksI used this:
a img {
text-decoration: none;
border: 0 none;
}
to get rid of the link boxes! Hope it helps
Les
-
Les Mac reacted to Wickham in XHTML Code for linksThe title="..." will show a tooltip in Firefox and some other browsers which some people don't like.
The link text Home in <a href="index.html">Home</a> is enough for screen readers for blind people. If you have an image link and no link text, then make the "a" style display: block; text-indent: -9999px; which will throw the text off-screen so you only see the image but a screen reader will still read the text.
-
Les Mac reacted to j05hr in XHTML Code for linksIf you look carefully at the way you are ending your tags <a/> should be </a>
So...
<div id="navigation"> <a href="index.html">Home<a/> <a href="contact.html">Contact Us<a/> <a href="equine_gallery.html">Equine Portfolio<a/> <a href="architectire_gallery.html">Architectire Portfolio<a/> <a href="landscape_wildlife_gallery.html">Landscape and Wildlife Portfolio<a/> <a href="pet_portrait_gallery.html">Pet Portraits<a/> <a href="still_life.html">Still Life Portfolio<a/> </div>
Should be...
<div id="navigation"> <a href="index.html">Home</a> <a href="contact.html">Contact Us</a> <a href="equine_gallery.html">Equine Portfolio</a> <a href="architectire_gallery.html">Architectire Portfolio</a> <a href="landscape_wildlife_gallery.html">Landscape and Wildlife Portfolio</a> <a href="pet_portrait_gallery.html">Pet Portraits</a> <a href="still_life.html">Still Life Portfolio</a> </div>
I hope it's you mistyping rather than the book printing it the way you have done it. If it is the latter I think it's time to get a new book.
A good way to test your code is this site.
http://validator.w3.org/
If you have hosting you just upload the link but if not there are links to paste your code in.
You need to use a doctype to test the code. So I put your code into a working example and then you can paste it and see what's wrong with it.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title></title> </head> <body> <div id="navigation"> <a href="index.html">Home<a/> <a href="contact.html">Contact Us<a/> <a href="equine_gallery.html">Equine Portfolio<a/> <a href="architectire_gallery.html">Architectire Portfolio<a/> <a href="landscape_wildlife_gallery.html">Landscape and Wildlife Portfolio<a/> <a href="pet_portrait_gallery.html">Pet Portraits<a/> <a href="still_life.html">Still Life Portfolio<a/> </div> </body> </html>
http://validator.w3.org/#validate_by_input
You will always need a doc type whether you use html/xhtml is up to you and which doctype you use too. strict/loose/transitional/frameset
http://www.w3schools.com/xhtml/xhtml_dtd.asp - some info on doctypes
Always validate your sites and then you are sticking to the standards and if you don't know what is causing the error you can always search it on Google or ask on here.
Hope this helps.