Getting rid of border around image

K

Kevin Audleman

This should be very simple. I've got an <a> tag surrounding an <img>
tag which puts a big blue border around the image. How do I get rid of
that border? I've tried <a style="border: none"> but the border
stays...

Any help appreciated.

Thanks,
Kevin
 
K

Kevin Audleman

This should be very simple. I've got an <a> tag surrounding an <img>
tag which puts a big blue border around the image. How do I get rid of
that border? I've tried <a style="border: none"> but the border
stays...

Any help appreciated.

Thanks,
Kevin

Oh yeah, you can see my site here: http://quick2m.com/izzy/index.php
 
A

asdf

Kevin Audleman said:
This should be very simple. I've got an <a> tag surrounding an <img>
tag which puts a big blue border around the image. How do I get rid of
that border? I've tried <a style="border: none"> but the border
stays...

Any help appreciated.

Thanks,
Kevin

try: <img style="border:none" src... etc... instead.


or if you want to remove borders for ALL images, do it with CSS instead (a
much better solution, IMO)

so... in CSS...

img {
border: none;
}

....or...

img {
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}

....if you want to remove borders ONLY for those images inside 'a' tags, try:

a img {
border: none;
}

Have fun playing!
 
D

dorayme

"asdf said:
try: <img style="border:none" src... etc... instead.


or if you want to remove borders for ALL images, do it with CSS instead (a
much better solution, IMO)

so... in CSS...

img {
border: none;
}


About your "really" asdf, some people would say that <img
style="... *is* css. I know what you mean I think.

"CSS" is quite a curious phrase, its exact grammatical nature
hard to pin down from the multiple contexts it is used in. There
is no obvious sheet about it in some contexts. <g>

I got all thingy about this years ago and probably said something
clueless and Steve Pugh thought I was on drugs. (I notice he pops
up now and again, I used to enjoy his posts for their nice
clarity)
 
G

GTalbot

This should be very simple. I've got an <a> tag surrounding an <img>
tag which puts a big blue border around the image. How do I get rid of
that border? I've tried <a style="border: none"> but the border
stays...

Any help appreciated.

Thanks,
Kevin

Kevin,

Removing borders around clickable images, around reactive images is
not recommendable as this removes the visual cue indicating that the
image is clickable, reactive. It's even a now standard usability
issue: perceived affordance of clickability, speed up scanning of
webpage, easying the reader/visitor's task of figuring out fast what's
clickable and what's not clickable. "Don't make me think" is even now
another standard principle in webpage design.

http://www.useit.com/alertbox/20040510.html

"removing the border that indicates an image is a link makes it harder
for users to distinguish quickly and easily which images on a web page
are clickable."
http://www.htmlhelp.com/faq/html/images.html#no-border

Regards, Gérard
 
D

dorayme

"rf said:
What else could it be.

An inline css instruction is a bit of css. It is different from
html presentational mark up. But asdf's reluctance is sort of
understandable because of the curious way in which "sheet" loses
its literal meaning. (We can say anything we like because he is
probably asleep in some godforsaken cold north hemisphere city.)

One might make some people more comfortable by calling an inline
style, an inline cascading style instruction, but that is not how
it has gone. Most of us are quite comfortable with the curiosity
of an absence of any sheetness about a lonely inline style and
happily call it inline css.

Perhaps a defence of this terminological curiosity is that even
an inline style has to take its place in a cascade of a style
sheet, either one supplied by the author externally linked or by
the browser (it almost always wins, but that is a mere detail. It
still has to front up in the ring to claim its victory and so is
sort of part of that big one sheet virtually considered... O
Christ, I am too sober to go on with this... <g>
 
A

Andy Dingley

About your "really" asdf, some people would say that <img
style="... *is* css. I know what you mean I think.

Well I know what you mean, and '<img style="...' _isn't CSS it's HTML.
The piece _inside_ the style attribute is CSS, but not its wrapper.

An external or an embedded CSS stylesheet is the better coice here of
course. If you can make a blanket statement like "Image links
shouldn't have borders", then you're blanketing the whole page or
site. I doubt you'd want to do each <img> tag on-by-one.
 
D

dorayme

<[email protected]
m>,
Andy Dingley said:
Well I know what you mean, and '<img style="...' _isn't CSS it's HTML.
The piece _inside_ the style attribute is CSS, but not its wrapper.

Well, OK! That settles it if that is what asdf was meaning and
sorry, asdf. I should better have said that this *is* doing it
with css, namely the bit inside. And then gone on to rave about
something that has always seemed (trivially) quixotic to me...

This is the big week in Australia to say sorry and I am going to
take every opportunity to partake in the national spirit:

http://preview.tinyurl.com/2q2ct4

Do I owe any apology to anyone else? This is your chance to get
it folks. A once in a lifetime, no questions asked, offer.
 
A

asdf

dorayme said:
About your "really" asdf, some people would say that <img
style="... *is* css. I know what you mean I think.

Yeah, yeah... ok, ok... u got me... I *meant* a CSS stylesheet file. I
figured most folks would know what I meant, though.
"CSS" is quite a curious phrase, its exact grammatical nature
hard to pin down from the multiple contexts it is used in. There
is no obvious sheet about it in some contexts. <g>

I got all thingy about this years ago and probably said something
clueless and Steve Pugh thought I was on drugs. (I notice he pops
up now and again, I used to enjoy his posts for their nice
clarity)

Pedantry will get you everywhere :)))
 
A

asdf

dorayme said:
<[email protected]
m>,


Well, OK! That settles it if that is what asdf was meaning and
sorry, asdf. I should better have said that this *is* doing it
with css, namely the bit inside. And then gone on to rave about
something that has always seemed (trivially) quixotic to me...

I have no idea what you are apologising for, but accepted anyway.

In any case, this argument does not help the OP, or anyone else, one whit.
Ok, Ok, I was very tired when I wrote my original reply, and figured that
the OP and others reading it, would know what I meant.
 
K

kendalk08

Kevin said:
This should be very simple. I've got an <a> tag surrounding an <img>
tag which puts a big blue border around the image. How do I get rid of
that border? I've tried <a style="border: none"> but the border
stays...

Any help appreciated.

Thanks,
Kevin

all you need to do is set the border="0" attribute on the image tag.
example: <img src="image.jpg" border="0">
 
J

Jonathan N. Little

kendalk08 said:
all you need to do is set the border="0" attribute on the image tag.
example: <img src="image.jpg" border="0">

Yes in 1996. In this century put "a img { border: 0; }" in your stylesheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top