picture as a link and borders

M

MWSunshine

Hi !

I am just begun to learn xgtml and css. I have probabily very basic question
but I couldn't find an answer. When I put on my page
<img src="images/bttn_shimel.jpg" /> - I can see a picture (surprise ! :) )
but when i make it a link like this
<a href="http://www.google.pl"><img src="images/bttn_shimel.jpg" /> </a>
there is additional border of that picture with color of default color of
link.
No matter what I set in css style sheet with a:pseudoclass.
Can you help me how to get rid of this border, or at least how to set the
color of this border to make it invisible (I have solid color background)

MWSunshine
 
N

Neal

Hi !

I am just begun to learn xgtml and css. I have probabily very basic
question
but I couldn't find an answer. When I put on my page
<img src="images/bttn_shimel.jpg" /> - I can see a picture (surprise !
:) )
but when i make it a link like this
<a href="http://www.google.pl"><img src="images/bttn_shimel.jpg" /> </a>
there is additional border of that picture with color of default color of
link.
No matter what I set in css style sheet with a:pseudoclass.
Can you help me how to get rid of this border, or at least how to set the
color of this border to make it invisible (I have solid color background)


img {border-width: 0;}
 
M

Mark Parnell

Hi !
G'day.

<a href="http://www.google.pl"><img src="images/bttn_shimel.jpg" /> </a>
there is additional border of that picture with color of default color of
link.

Yes. This is normal, and expected.
No matter what I set in css style sheet with a:pseudoclass.
Can you help me how to get rid of this border,

Then how would I know it was a link?
 
R

rf

MWSunshine said:
Hi !

I am just begun to learn xgtml and css. I have probabily very basic question
but I couldn't find an answer. When I put on my page
<img src="images/bttn_shimel.jpg" /> - I can see a picture (surprise ! :) )
but when i make it a link like this
<a href="http://www.google.pl"><img src="images/bttn_shimel.jpg" /> </a>
there is additional border of that picture with color of default color of
link.
No matter what I set in css style sheet with a:pseudoclass.
Can you help me how to get rid of this border, or at least how to set the
color of this border to make it invisible (I have solid color background)

a img {border: 0}
 
S

Stuart Palmer

'cos it will work in older browsers and newer.

Neal said:
The OP is using CSS, why suggest a deprecated solution?

img {border-width: 0;} is the CSS solution.
 
R

rf

[upside posting corrected]

Stuart Palmer said:
'cos it will work in older browsers and newer.

And just which "older" browser does not support border-width: 0?

Pre version 4?
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top