@disembodiedNov 19.2006 — #well a link (text link that is) will not have a border by default since its an inline element and not a block-level element.
As for images that are linked, which would have a border, you change the border in the img CSS (as opposed to the link css)... something like this:
img {
border: none;
}
or
img {
border: 1px solid #000;
}
As for your 'border' (underline?) looking purple, perhaps it is just your screen... if you are using '#000' or '#000000' (the shorthand is just easier) then it is black, no matter what it looks like to you. You can, instead (if you want), use the word 'black' instead of the hex number, but the hex number isn't causing the problem itself (if you are using a WYSIWYG editor perhaps you are thinking you are choosing black when its just a dark purple, so its applying a different hex number then #000).
thanks for the fast reply, got the border colour working, but by making it an img css it adds a border to all my images, but i just want this on the linked images? how do i link the css to one image but not another?
The other thing wasnt an underline
i havnt seen it before, but its just like an aqua blue square that apears around a link that ive just clicked on, but disapears when i click away from the link?
its not hapening in safari, so im asuming its got something to do with internet explorer.??
thanks for the fast reply, got the border colour working, but by making it an img css it adds a border to all my images, but i just want this on the linked images? how do i link the css to one image but not another?
The other thing wasnt an underline
i havnt seen it before, but its just like an aqua blue square that apears around a link that ive just clicked on, but disapears when i click away from the link?
its not hapening in safari, so im asuming its got something to do with internet explorer.??[/QUOTE]
You could state in your STYLE section"
img {border:0 none;}
and if the [I]image[/I] is also a [I]link[/I], then this too;
[B]img a [/B]{border:0 none;}
The two statements above are not the same thing and are probably handled differently. I suppose that " [B]*[/B]img {border:0;} " would grab ALL images (using the 'universal selector' " [B]*[/B] ", -but I am not a fan of the 'star' method...
I might be mistaken (and I am sure someone will jump in here and correct me I am), that for "border" you can state either "0" ("zero"), "none", or both as I have done. There is some reason why using both is a hedge against possibly not being recognized and again, -I am sure that it's an IE thing...
What these other two people said is pretty much on target, but I'll just sum up the method you want to use for borders around an image:
FOR ALL IMAGES, LINKED OR OTHERWISE (and with a border)
img {
border: 1px solid #000;
}
FOR ALL IMAGES, LINKED OR OTHERWISE (and no border no matter what)
img {
border: none;
}
(note* - I do not think '0 none' does anything more, I have never seen a problem with 'border: none', but I am not 100% positive)
FOR LINKED IMAGES ONLY, and ALL LINKED IMAGES
img a {
border: 1px solid #000;
}
(you can also used a.visited, a:hover, and a.active for when the link is in that specific state... if you do, make sure you do it it in that order (a, a.v, a:h, a.a) because IE is picky)
FOR A SPECIFIC IMAGE(s)
.imgborder {
border: 1px solid #000;
}
and then in the 'img src=blah blah' HTML include 'class="imgborder" (or whatever you decide to call it.
--------- As for the other problem you are having, I am still not sure of the specific problem, perhaps you could create the problem and post a screenshot?
Also, is it text or an image that is getting the border?
@WebJoelNov 20.2006 — #....FOR ALL IMAGES, LINKED OR OTHERWISE (and no border no matter what)
img {
border: none;
}
(note* - I do not think '0 none' does anything more, I have never seen a problem with 'border: none', but I am not 100% positive)
....[/QUOTE] Actually, I have never seen it make any notable difference either, but thought it had something to do with a (much?) older version of a browser, or possibly a platform. ? It's just one of those 'nice to know' things like stating
[B]cursor: pointer; cursor: hand;[/B] whereby stating "pointer" targets compliant browsers, and "hand" targets specifically IE 5.x (which not only can't understand "pointer", but will fail if "pointer" comes [I]after[/I] "hand"... because "hand" is the IE-proprietary & expected declaration.
@Jeff_MottNov 21.2006 — #I am sure someone will jump in here and correct me[/quote]Sorry to be the stickler. I'm just trying to keep careless mistakes from creeping in.
and if the image is also a link, then this too;
img a {border:0 none;}[/quote]The IMG element is empty; it will never contain any other element. Therefore, this selector will never select anything. Probably what you mean to do is [u]a img { border: none }[/u], which will select only those images that are also links.
I suppose that " *img {border:0;} " would grab ALL images (using the 'universal selector' " * ", -but I am not a fan of the 'star' method...[/quote]There is actually no difference between [u]img { border: none }[/u] and [u]* img { border: none }[/u]. The star in this case is redundant. Both will select all images.