SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard Keriam's Avatar
    Join Date
    Jun 2003
    Location
    Colorado, USA
    Posts
    1,178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS hyperlink issue and IE6

    I am converting a site that had previously relied heavily on tables to tableless with CSS. I have run into a snag in hyperlinking an image. In IE6 the image shows a box around it using the browser default hyperlink colors. Opera does not show the box. Opera is still having some issues with the overall layout but I will deal with those once I have everything working in IE

    Here is how I am entering the image:

    Code:
    <p class="italic">
                  Visit our online community:
                  <a href="#" title="test"><img src="images/test.gif" width="319" height="35" alt="test" align="top"></a>
                </p>
    and this is the CSS for it:

    Code:
    a:link
    {
    text-decoration: none;
    }
    
    a:visited
    {
    text-decoration: none;
    }
    
    a:hover
    {
    text-decoration: none;
    }
    
    a:active
    {
    text-decoration: none;
    }
    I have tried adding border: none; and color: transparent; and yet the box keeps appearing.

    What am I overlooking or doing wrong?
    Never put off until tomorrow what you can do
    the day after tomorrow. ~ Mark Twain

  2. #2
    SitePoint Wizard Keriam's Avatar
    Join Date
    Jun 2003
    Location
    Colorado, USA
    Posts
    1,178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Grrrr! I tried one more thing after I posted this.

    Code:
    img
    {
    border: none;
    }
    The box is now gone in IE. Is the best/correct way or this there another way?
    Never put off until tomorrow what you can do
    the day after tomorrow. ~ Mark Twain

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,296
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Yes that's the correct way to do it

    BTW in your anchor definitions you could define all those styles in one go:
    e.g.
    Code:
    a {text-decoration: none;}
    This will cascade through all the other states.

    Paul

  4. #4
    SitePoint Wizard Keriam's Avatar
    Join Date
    Jun 2003
    Location
    Colorado, USA
    Posts
    1,178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, Paul!
    Never put off until tomorrow what you can do
    the day after tomorrow. ~ Mark Twain


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •