Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Getting rid of border around image

Reply
Thread Tools

Getting rid of border around image

 
 
Kevin Audleman
Guest
Posts: n/a
 
      02-10-2008
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
 
Reply With Quote
 
 
 
 
Kevin Audleman
Guest
Posts: n/a
 
      02-10-2008
On Feb 9, 6:49 pm, Kevin Audleman <(E-Mail Removed)> wrote:
> 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
 
Reply With Quote
 
 
 
 
asdf
Guest
Posts: n/a
 
      02-10-2008

"Kevin Audleman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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!



 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      02-10-2008
In article
<47ae6fbc$0$3350$(E-Mail Removed)>,
"asdf" <(E-Mail Removed)> wrote:

> 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)

--
dorayme
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      02-10-2008

"dorayme" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In article
> <47ae6fbc$0$3350$(E-Mail Removed)>,
> "asdf" <(E-Mail Removed)> wrote:
>
>> 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.


What else could it be. Even the HTML spec states that the value of the style
attribute is CSS.

http://www.w3.org/TR/html401/present...tml#adef-style

--
Richard.


 
Reply With Quote
 
GTalbot
Guest
Posts: n/a
 
      02-10-2008
On 9 fév, 21:49, Kevin Audleman <(E-Mail Removed)> wrote:
> 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
--
Internet Explorer 7 bugs
http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      02-10-2008
In article <Dfyrj.13090$(E-Mail Removed)>,
"rf" <(E-Mail Removed)> wrote:

> "dorayme" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > In article
> > <47ae6fbc$0$3350$(E-Mail Removed)>,
> > "asdf" <(E-Mail Removed)> wrote:
> >
> >> 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.

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

--
dorayme
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      02-10-2008
On 10 Feb, 07:33, dorayme <(E-Mail Removed)> wrote:

> 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.
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      02-10-2008
In article
<(E-Mail Removed)
m>,
Andy Dingley <(E-Mail Removed)> wrote:

> On 10 Feb, 07:33, dorayme <(E-Mail Removed)> wrote:
>
> > 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.


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.

--
dorayme
 
Reply With Quote
 
asdf
Guest
Posts: n/a
 
      02-10-2008

"dorayme" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In article
> <47ae6fbc$0$3350$(E-Mail Removed)>,
> "asdf" <(E-Mail Removed)> wrote:
>
>> 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.
>


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 ))


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get rid of border line around linked image Kian HTML 18 11-27-2012 10:03 PM
how to get rid off border around anchor link Jack Jarmush HTML 3 08-03-2009 02:57 AM
How do I get rid of the border on an image when I make it a live link? johnsonholding@yahoo.com HTML 23 03-28-2006 10:56 PM
how do i get rid of border around individual checkbox in checkboxlist? TS ASP .Net Web Controls 5 08-10-2005 09:31 AM
Help with border around image Keith Smith Javascript 1 05-11-2005 04:16 AM



Advertisments