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 9 of 9
  1. #1
    New to the CF scene
    Join Date
    May 2011
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts

    text-decoration on hyperlink - how to remove?

    On IE It appears that my img hyperlinks have a white border like so:



    However on Firefox it appears:



    Here is the code snippet:

    Code:
    .textbackgroundcolor{
    	background-color: #000000;
    	font:25px;}
    I have tried with text-decoration:none whoever this did not fix the IE issue.

  • #2
    Regular Coder
    Join Date
    Sep 2006
    Posts
    216
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Are you trying to show the white border in firefox?

    If so, the css "background-color" property will set the background colour of the element, to show a white border round the image you need the css "border" property applied to the image element

  • #3
    New to the CF scene
    Join Date
    May 2011
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Looks like I posted the wrong part by mistake, it appears that there could be a bug in IE that is displaying the white border around my IMG links. I do not want this and have not declared a white boarder around it. All other browsers are fine the white border only appears in IE (using IE9).

    Here is the code I tried,

    Code:
    .rollover
    	
    a:link {
    text-decoration: none;
    border:none;
    border:0px;
    }
    a:img{
    	border:0px;
    }
    a:visited {
    	text-decoration: none;
    }
    a:hover {
    	text-decoration: none;
    	background-color: #000;
    }
    a:active {
    	text-decoration: none;
    }
    As you can see even with border none, 0px text dec off it is still there.

  • #4
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    Have you got a link to your page?

    If '.rollover' is at the top of your css as shown then this is incorrect and may cause the following rules (or at least one of them) to be ignored.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • Users who have thanked AndrewGSW for this post:

    wicked677 (05-09-2011)

  • #5
    New Coder
    Join Date
    Apr 2011
    Posts
    19
    Thanks
    2
    Thanked 2 Times in 2 Posts
    hi wicked677,

    You can try this one:

    <img alt="next" src="next_button.png" BORDER="0"/>

  • #6
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    Quote Originally Posted by newbb View Post
    hi wicked677,

    You can try this one:

    <img alt="next" src="next_button.png" BORDER="0"/>
    If the op is already using css rules and a stylesheet (which is good) I don't think it's helpful to recommend using a deprecated attribute as a quick fix. This may work in this simple case, but he would be better served taking the time to understand how css might correct the issue.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • Users who have thanked AndrewGSW for this post:

    wicked677 (05-09-2011)

  • #7
    New to the CF scene
    Join Date
    May 2011
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Do not want to reveal website I can PM you it and really do appreciate your help! (It's for a business) - I am using a stylesheet and have considered the border=0 in HTML however this is not what I want to do going forward the whole idea I have tried to learn CSS is to minimise code.

    Andrew, I've PM'd you my URL.

  • #8
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    I have IE 8 and the line around the links is initally blue but changes colour when visited etc. Are you trying to get rid of all of these lines?

    CSS is case-sensitive so change 'A' to 'a' throughout and check for any similar corrections. Then try
    Code:
    #navigation a img {
        border: 0px;
    }
    but you will probably need to re-check other rules for the 'a' links.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • Users who have thanked AndrewGSW for this post:

    wicked677 (05-09-2011)

  • #9
    New to the CF scene
    Join Date
    May 2011
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Andrew, you rock. Works a treat. Really do appreciate your help, take care!


  •  

    Posting Permissions

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