ayahsaba76.blogspot.com
So, you want to make a Web Page! Lesson 17 |
FAQ: My image links have these little blue dashes next to
them. Also I keep getting spaces between them and I want them to be
flush up against each other. I don't understand... it works right in
Browser B.
A: Most browsers interpret a carriage return between images as a space. A few browsers don't. It's that simple. The little blue dash (seen in some browsers) is simply the link underlining an empty space. The cure is to eliminate carriage returns right before or right after the image. This is the markup for the above images: <p align="center"> <a href="myhome.html"> <img src="myhome.gif" width="66" height="23" border="0" alt="Home"> </a> <a href="mailto:me@my.house"> <img src="myemail.gif" width="66" height="23" border="0" alt="Email"> </a> <a href="mylinks.html"> <img src="mylinks.gif" width="66" height="23" border="0" alt="Links"> </a> </p>If we were to change it to this we would eliminate the little blue dashes: <p align="center"> <a href="myhome.html"><img src="myhome.gif" width="66" height="23" border="0" alt="Home"></a> <a href="mailto:me@my.house"><img src="myemail.gif" width="66" height="23" border="0" alt="Email"></a> <a href="mylinks.html"><img src="mylinks.gif" width="66" height="23" border="0" alt="Links"></a> </p>Another adjustment and the spaces disappear too: <p align="center"> <a href="myhome.html"><img src="myhome.gif" width="66" height="23" border="0" alt="Home"></a><a href="mailto:me@my.house"><img src="myemail.gif" width="66" height="23" border="0" alt="Email"></a><a href="mylinks.html"><img src="mylinks.gif" width="66" height="23" border="0" alt="Links"></a> </p>Take the time to understand what's going on in the above examples. Is this a pain in the butt? Only if you don't understand what's happening and how to fix it. Is Browser A a crappy browser? Not necessarily, it's just different than Browser B. Browsers sometimes do different things with the same markup. |
Another way to link is to link not just to a page, but to a specific part of a page. Click here
to be magically transported to where we first talked about URLs. Since
it would be kind of hard to have you build an example, I'll just do the
best I can to explain how it's done.
First start with the spot you want people to be transported to. Pick a word and wrap it in the <a> tags.
<a>Add</a> the URL and you're done!
Next give that spot a name...
<a name="upabit">Add</a> the URL and you're done!
What you have done is marked that spot. (Or made an anchor.) Now that anchor can be referenced and linked to.
Start building the link...
Click <a>here</a> to be magically transported...
Add the URL of the document to be referenced...
Click <a href="lesson12.html">here</a> to be magically transported...
And lastly, add # and the anchor name like so...
Click <a href="lesson12.html#upabit">here</a> to be magically transported...
And that's all there is to it! Not exactly brain surgery is it??