CSS Simple Question

C

Christopher R

What determines the color of a link around a picture?
I thought that is was
a {
text-decoration: underline;
color: #009C5A;
}

I want no boarder color around a clickable image, so I thought this would
work.
a {
text-decoration: none;

}


<a
href="http://www.somethingorother.html"><imgsrc="../common/images/myImage.gi
f="88" height="31" alt="" /></a>

I tried
div#image a{
text-decoration: none;
}
This has to be easy right?
 
E

Els

Christopher said:
What determines the color of a link around a picture?

I want no boarder color around a clickable image,

This has to be easy right?

Yes :)
a img{border: 0px;}
 
L

Lauri Raittila

In said:
What determines the color of a link around a picture?
I thought that is was
a {
text-decoration: underline;
color: #009C5A;
}

Maybe. But to explicitly se link image border color:

a:link img {border-color:blue;}
a:visited img {border-color:#f0f}
I want no boarder color around a clickable image, so I thought this would
work.
a {
text-decoration: none;

}

Your problem is border, not border color, right?

Your problem is *image* border, right?

Then, how about removing image border?

img {border:0}
This has to be easy right?

Yes. OTOH, if you remove image border, you should use something else to
make clear if image link is visited or not.
 
J

Jukka K. Korpela

Christopher R said:
What determines the color of a link around a picture?

Several factors, including the browser settings and potentially the phase
of the moon.
I thought that is was
a {
text-decoration: underline;
color: #009C5A;
}

What made you think so? And the rule is a very poor one, for reasons I
won't explain here in detail, but see
http://www.cs.tut.fi/~jkorpela/www/links.html
I want no boarder color around a clickable image,

Stop wanting that. Users want to know whether it is a link or not.
If the border disturbs you, don't make an image a link but let the image
stand on its own, and use a textual link along with it.
so I thought this
would work.
a {
text-decoration: none;

}

Why would it affect the border? But it surely causes other damage.
<a
href="http://www.somethingorother.html"><imgsrc="../common/images/myIm
age.gi f="88" height="31" alt="" /></a>

Why don't you post a URL instead of a fake snippet of code that contains
nonexistent addresses and markup errors? The alt="" part, in the context
of a _link_, is a particularly destructive choice.
This has to be easy right?

To _any_ question, there is an answer that is easy, simple, pleasant and
completely wrong. Just stay tuned to seeing it soon - you're asking for
it. Alternatively, explain what you are really doing, and illustrate it
with a URL.
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top