Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jan 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    img as a link-color

    <a href="\"><img src="img.jpg"></a>

    for example if i do the above. in IE and FF there will be a color around the image. is there anyway to get rid of this without have to use css? it moves the image by a few pixels and i dont want that to happen.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Its called a border. Add this to your stylesheet
    Code:
    a img {
    border:0;
    }
    If you don't know what a stylesheet is then I suggest you stop coding html now and being to learn CSS. If you really don't care then add this to the image tag
    Code:
    style="border:0;"
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Jan 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if i dont know what a stylesheet is, haha, comeon! thats like first day html. currently im setting up my site with pure css, no tables, all i can say is that getting all 3 browsers to use it is hard! stupid MS with their made up rules!

    anyways, its not the border, that was the first thing that i tried.
    a crappy way that i got around this was using the onclick method in the img tag to set the current window to where i wanted to go. i also used css to change the cursor when i hovered over it. so as long as javascript is enabled in the browser..

    this isnt an essential link either. it is just the logo image that ppl can click on to go back to the home page, but i also have a link to the homepage in the menu.

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    And if javascript is disabled? Maybe you should post a link to your site since you didn't explain yourself well enough to begin with.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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