By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,098 Members | 1,918 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,098 IT Pros & Developers. It's quick & easy.

Image border color

P: n/a
given that the img border >0, how is a border color specified?

Chuck
Jul 23 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
In article <SLUcd.271438$D%.166650@attbi_s51>, ch*****@acm.org says...
given that the img border >0, how is a border color specified?


Best to use styles:

<img style="border: medium Red;">
Jul 23 '05 #2

P: n/a
On Mon, 18 Oct 2004 15:03:34 -0500, Mr.Clean <mrclean@p&g.com> wrote:
In article <SLUcd.271438$D%.166650@attbi_s51>, ch*****@acm.org says...
given that the img border >0, how is a border color specified?


Best to use styles:

<img style="border: medium Red;">


Better to do it in a stylesheet rather than inline, of course.

You could set things separately, as with:

img {
border-width: 3px;
border-color: #ff0000;
border-style: dotted;
}

Or all together:

img {
border: 3px #ff0000 dotted;
}

Realize too that if the image is in an anchor, the border will take the
color of the link. But you can change that if you desire.
Jul 23 '05 #3

P: n/a
In article <op**************@news.individual.net>, ne*****@yahoo.com
says...
On Mon, 18 Oct 2004 15:03:34 -0500, Mr.Clean <mrclean@p&g.com> wrote:
In article <SLUcd.271438$D%.166650@attbi_s51>, ch*****@acm.org says...
given that the img border >0, how is a border color specified?
Best to use styles:

<img style="border: medium Red;">


Better to do it in a stylesheet rather than inline, of course.

Why so? I think having a stylesheet adds weight when you can easily
do it inline.
Realize too that if the image is in an anchor, the border will take the
color of the link. But you can change that if you desire.


Yes, forgot to mention that.
Jul 23 '05 #4

P: n/a
Mr.Clean wrote;
In article <op**************@news.individual.net>, ne*****@yahoo.com
says...
On Mon, 18 Oct 2004 15:03:34 -0500, Mr.Clean <mrclean@p&g.com> wrote:
In article <SLUcd.271438$D%.166650@attbi_s51>, ch*****@acm.org says...
> given that the img border >0, how is a border color specified?

Best to use styles:

<img style="border: medium Red;">
Better to do it in a stylesheet rather than inline, of course.

Why so?


Because it is much more readable, and generally better.
I think having a stylesheet adds weight when you can easily
do it inline.


Well, supposing you had not more than three unique style rules (more will
be heavier). But inline styles are never ever nice. If you have unique
style rules, use embedded stylsheet. If you have any style rule used in
more than one page, use external stylesheet. Or, just use external, it
doesn't add much weight.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Jul 23 '05 #5

P: n/a
On Mon, 18 Oct 2004 17:01:03 -0500, Mr.Clean <mrclean@p&g.com> wrote:
ne*****@yahoo.com says...
Better to do it in a stylesheet rather than inline, of course.

Why so? I think having a stylesheet adds weight when you can easily
do it inline.


But if the style would apply to any other page, you are better off with a
stylesheet. Most styles will.
Jul 23 '05 #6

P: n/a

"Mr.Clean" <mrclean@p&g.com> wrote in message
news:<1098136863.+dIRbGDbbSufrnw0zn8Kgw@teranews>. ..

In article <op**************@news.individual.net>, ne*****@yahoo.com
says...
On Mon, 18 Oct 2004 15:03:34 -0500, Mr.Clean <mrclean@p&g.com> wrote:
In article <SLUcd.271438$D%.166650@attbi_s51>, ch*****@acm.org says... given that the img border >0, how is a border color specified?
Best to use styles:

<img style="border: medium Red;">
Better to do it in a stylesheet rather than inline, of course.

Why so? I think having a stylesheet adds weight when you can easily

do it inline. Realize too that if the image is in an anchor, the border will take the
color of the link. But you can change that if you desire.
Yes, forgot to mention that.

Thanks to you all! Have opted for external style sheets. But, regarding
Realize too that if the image is in an anchor, the border will take the
color of the link. But you can change that if you desire.


How do I change it? My images are anchors. Sorry to be so dense. :(

Chuck
Jul 23 '05 #7

P: n/a
On Tue, 19 Oct 2004 17:32:38 GMT, Chuck <ch*****@acm.org> wrote:
How do I change it? My images are anchors. Sorry to be so dense. :(


Well, first you must decide if you should change it. The border will take
the link colors, and in most situations we want this, it tells the user
whether they've visited the link or not. It also signals that it is a
link. So before you do this, be sure that 1) the image is quite obviously
a link, and 2) the lack of visited/unvisited coloring is not a usability
issue.

That said,

a:link img, a:visited img, a:focus img, a:hover img, a:active img {
border: 3px green solid;
}

or something like that.
Jul 23 '05 #8

P: n/a

"Neal" <ne*****@yahoo.com> wrote in message
news:op**************@news.individual.net...
On Tue, 19 Oct 2004 17:32:38 GMT, Chuck <ch*****@acm.org> wrote:
How do I change it? My images are anchors. Sorry to be so dense. :(


Well, first you must decide if you should change it. The border will take
the link colors, and in most situations we want this, it tells the user
whether they've visited the link or not. It also signals that it is a
link. So before you do this, be sure that 1) the image is quite obviously
a link, and 2) the lack of visited/unvisited coloring is not a usability
issue.

That said,

a:link img, a:visited img, a:focus img, a:hover img, a:active img {
border: 3px green solid;
}

or something like that.


Thanks, Neal. That did the trick! Just what the doctor ordered.

Chuck
Jul 23 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.