954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

remove dashed border when u press/select a linkd image (pic included)

http://www.fredmyerscough.co.uk/myfiles/showborder.jpg

im using some jquery stuff to make myself a new website, but when you press the image (used for the menu) a dashed border apears around it. im not sure what element this is called, since its not affected by border: none; in css.

any help or advice on removing it? =)

thanks

OnIIcE
Light Poster
34 posts since Dec 2007
Reputation Points: 9
Solved Threads: 1
 

fixed it myself after a few more hours reading.

outline: none;

if anyones interested! =)

OnIIcE
Light Poster
34 posts since Dec 2007
Reputation Points: 9
Solved Threads: 1
 

-did that work in opera?

Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
 

wow, that's weird that it has a border inside of the image.

in the html, try after the image:

add "border="none"

so it should look like this:

your image.jpg

w33n
Light Poster
25 posts since Jun 2008
Reputation Points: 10
Solved Threads: 2
 

he is talking about focus (element selected) outline; otherwise 'a tiny dotted border around the element that recieved focus'. But, css declaration " outline: none; " will work only in mozillas.

IE offers outline:expression(hideFocus='true')
or an inline statement hideFocus='true' although not a requirement because in IE this outline doesn't affect the page layout, while in mozilla it does.

On the other side Opera doesn't offer any kind of means to do that, allthough it doesn't affect the document, and normally would not be a requirement, it does affect your design and your menu links may get ugly on keyboard navigation because on top of a fancy border around the elment, it also selects its content forcing the text content to have a navy background color.

- If anybody found a 'cure' for this in Opera, ..would be much appreciated.

Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
 

it works in IE8 (what i work in) and jus tried in FireFox and Chrome and it works. ive just got the line i said in my link css like:

a { display: block; }

borders just the online isnt it? i got rid of that, its how Troy said - its when the object is focusd on.

on the other hand - from just quickly testing - turns out that FF and Chrome have a bit of a problem with jQuery!

OnIIcE
Light Poster
34 posts since Dec 2007
Reputation Points: 9
Solved Threads: 1
 

Any success with Opera?

Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
 

That dotted line indicates that the picture has the focus. That is a windows function. It is supposed to be there.

MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182
 
That dotted line indicates that the picture has the focus. That is a windows function. It is supposed to be there.

But not here: http://i25.tinypic.com/21bjf3k.png
Here you have 3-state buttons or should I say "5".
1Normal 2Hovered 3Focused 4Visited 5Active
although 2 of them are intermediary and will only change font color intensity.
Currently Hovered button is "home" sorry you cant see the mosue from the printScreen command. The focused button is "projects" and the current page not indicated by the button state is "contact".

But then Opera does this:
http://i30.tinypic.com/33z9uu9.png
without giving any means to controll it.
At the end everybody will keep his own opinion allthough the situation is clear to see.

Regards.

Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
 

Use

a:active img, a:hover img, a img, img { border:0 none;}


.
That probably should fix it.

codejoust
Junior Poster
180 posts since Jul 2009
Reputation Points: 18
Solved Threads: 21
 

Of course not - the outline of the element recieving focus has nothing to do with its borders.

Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
 

Use

a:active img, a:hover img, a img, img { border:0 none; outline:0 none !important;}
. That probably should fix it.


Sorry! As pointed out afterwards, I forgot to put the outline.
Linked images usually have a border, and active ones have an outline, which I forgot about.
The important isn't necessary, I just put it there to emphasize it.

codejoust
Junior Poster
180 posts since Jul 2009
Reputation Points: 18
Solved Threads: 21
 
Sorry! As pointed out afterwards, I forgot to put the outline. Linked images usually have a border, and active ones have an outline, which I forgot about. The important isn't necessary, I just put it there to emphasize it.


Yes, and how do you remove this focus outline in Opera or in IE?

Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
 

For that, add a:focus img to the css selector syring. (sepeprated by commas). To the border and outline none selector. There are tons of link pusedo elenrs and methods supported by different browsers.

codejoust
Junior Poster
180 posts since Jul 2009
Reputation Points: 18
Solved Threads: 21
 

May I see the code for I'm dying to remove it from Opera!
Did you read my posts on this thread?

Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
 
a:focus, a:active, a:link, a:hover img, a img, img { border:0 none; outline:0 none;}
codejoust
Junior Poster
180 posts since Jul 2009
Reputation Points: 18
Solved Threads: 21
 

float your image

img {
float: left }
Zero13
Practically a Master Poster
624 posts since Jan 2009
Reputation Points: 120
Solved Threads: 139
 

You guys, are kidding right?!!

Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
 
You guys, are kidding right?!!


Floating will have no effect, I think....

codejoust
Junior Poster
180 posts since Jul 2009
Reputation Points: 18
Solved Threads: 21
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You