picture as a link and borders

Discussion in 'HTML' started by MWSunshine, Jun 23, 2004.

  1. MWSunshine

    MWSunshine Guest

    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
     
    MWSunshine, Jun 23, 2004
    #1
    1. Advertising

  2. MWSunshine

    Neal Guest

    On Wed, 23 Jun 2004 07:26:17 +0200, MWSunshine <>
    wrote:

    > 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;}
     
    Neal, Jun 23, 2004
    #2
    1. Advertising

  3. <a href="http://www.google.pl"><img src="images/bttn_shimel.jpg" border="0"
    /> </a>

    "MWSunshine" <> wrote in message
    news:cbb4b1$7na$...
    > 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
    >
    >
     
    Stuart Palmer, Jun 23, 2004
    #3
  4. MWSunshine

    Mark Parnell Guest

    On Wed, 23 Jun 2004 07:26:17 +0200, MWSunshine
    <> declared in alt.html:

    > 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?

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jun 23, 2004
    #4
  5. MWSunshine

    rf Guest

    "MWSunshine" <> wrote in message
    news:cbb4b1$7na$...
    > 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}

    --
    Cheers
    Richard.
     
    rf, Jun 23, 2004
    #5
  6. MWSunshine

    Neal Guest

    On Wed, 23 Jun 2004 06:34:10 +0100, Stuart Palmer
    <> wrote:

    > <a href="http://www.google.pl"><img src="images/bttn_shimel.jpg"
    > border="0"
    > /> </a>
    >


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

    img {border-width: 0;} is the CSS solution.
     
    Neal, Jun 23, 2004
    #6
  7. MWSunshine

    MWSunshine Guest

    Thank you !
    MWSunshine
     
    MWSunshine, Jun 23, 2004
    #7
  8. 'cos it will work in older browsers and newer.

    "Neal" <> wrote in message
    news:eek:...
    > On Wed, 23 Jun 2004 06:34:10 +0100, Stuart Palmer
    > <> wrote:
    >
    > > <a href="http://www.google.pl"><img src="images/bttn_shimel.jpg"
    > > border="0"
    > > /> </a>
    > >

    >
    > The OP is using CSS, why suggest a deprecated solution?
    >
    > img {border-width: 0;} is the CSS solution.
     
    Stuart Palmer, Jun 23, 2004
    #8
  9. MWSunshine

    rf Guest

    [upside posting corrected]

    "Stuart Palmer" <> wrote in message
    news:...
    >
    > "Neal" <> wrote in message
    > >
    > > The OP is using CSS, why suggest a deprecated solution?
    > >



    > 'cos it will work in older browsers and newer.


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

    Pre version 4?

    --
    Cheers
    Richard.
     
    rf, Jun 23, 2004
    #9
  10. MWSunshine

    Mitja Guest

    Stuart Palmer <>
    (news:) wrote:
    > "Neal" <> wrote in message
    > news:eek:...
    >> On Wed, 23 Jun 2004 06:34:10 +0100, Stuart Palmer
    >> <> wrote:
    >>
    >>> <a href="http://www.google.pl"><img src="images/bttn_shimel.jpg"
    >>> border="0"
    >>> /> </a>
    >>>

    > 'cos it will work in older browsers and newer.


    Yep. That's why I always use <font>...
     
    Mitja, Jun 23, 2004
    #10
  11. MWSunshine

    Kris Guest

    In article <>,
    "Stuart Palmer" <> wrote:
    > "Neal" <> wrote in message
    > news:eek:...
    > > On Wed, 23 Jun 2004 06:34:10 +0100, Stuart Palmer
    > > <> wrote:
    > >
    > > > <a href="http://www.google.pl"><img src="images/bttn_shimel.jpg"
    > > > border="0"
    > > > /> </a>

    > > The OP is using CSS, why suggest a deprecated solution?
    > > img {border-width: 0;} is the CSS solution.

    > 'cos it will work in older browsers and newer.


    Really? Or because old habits are hard to lose?

    --
    Kris
    <> (nl)
     
    Kris, Jun 23, 2004
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    893
    Kevin Spencer
    May 17, 2005
  2. Bailee
    Replies:
    9
    Views:
    654
  3. George
    Replies:
    9
    Views:
    4,985
    George
    Oct 25, 2004
  4. Greg N.
    Replies:
    26
    Views:
    4,876
  5. Replies:
    8
    Views:
    1,300
    Mick White
    Apr 19, 2005
Loading...

Share This Page