HTML problem..

Started by vict0r, Thu 11/01/2007 13:28:25

Previous topic - Next topic

vict0r

I'm just practising with some HTML stuff, and I'm trying to hyperlink an image.
Problem is, that when I do hyperlink them, a weird blue frame appears around
it :-\

Anyone know what I've done wrong:

Code: ags
<a href="hjemmeisden.html"><img src="home.jpg"></a><br>

dasjoe

the blue border is normal.
just set img { border:0; } in your css and it'll disappear
... it's quite easy being the best.

voh

Code: ags
<a href="hjemmeisden.html"><img src="home.jpg" border="0"></a><br>


Would also work, and since you're not using XHTML, is acceptable :)
Still here.

TerranRich

The proper way according to XHTML, would be to use

Code: ags
<a href="hjemmeisden.html"><img src="home.jpg" style="border: none" /></a><br />


Including the /> parts. But voh's way is just fine. ;)
Status: Trying to come up with some ideas...

voh

Well, TR, technically speaking an alt tag is also required ;)

Code: ags
<a href="hjemmeisden.html"><img src="home.jpg" style="border: none" alt="home" /></a><br />


Also, border="0" is allowed in Transitional and Frameset. So unless you're doing Strict, using style="" is not necessary.

But since he mentioned he's experimenting with HTML, I doubt XHTML will be very important at this point. regular HTML will do fine ;)
Still here.

vict0r

Thanks alot! :)
I don't have the html file available right now, but I guess you know your stuff! So thanks a bunch!  :)

voh

If you ever need assistance with (X)HTML or CSS or whatnot, you know how to reach me. I love helping people with that stuff :)
Still here.

SMF spam blocked by CleanTalk