#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2008
    Posts
    6
    Rep Power
    0

    CSS Div ignores hyperlink style


    I have this website that i am using CSS for much of the styles.

    I have used hotspot hyperlinks in parts of the images. Now there is the blue line that a link in html normally has around the entire div the hotspot is in. If clicked its the purple colour that a clicked (visited) hyperlink has.

    The link to the page in question is
    itxtme.com/still_lime/os_z_b.html

    This only occurs in IE, it is not occuring in Opera. All the other links are working correctly. All source is in the webpage (view/source code)

    Kind regards how i can work around this!

    Scott
  2. #2
  3. Retired
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Finland
    Posts
    9,115
    Rep Power
    2498
    Please post your relevant code and give your page a valid doc type.
    You have little or no chance of pages looking the same in different browsers without one.

    You may want to have a look in other browser too.
    Doesn't look right in Firefox...
    Attached Images

    Cheers,
    Jamie

    >_ My Music Blog | Losing weight @notsoheavyblog | My Tweets

    __________________

    Let the might of your compassion arise to bring a quick end
    to the flowing stream of the blood and tears .....
    Please hear my anguished words of truth.

    __________________
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2008
    Posts
    6
    Rep Power
    0
    Originally Posted by jabba_29
    Please post your relevant code and give your page a valid doc type.
    You have little or no chance of pages looking the same in different browsers without one.

    You may want to have a look in other browser too.
    Doesn't look right in Firefox...
    Im not quite sure what you mean by valid doc type, i am not huge on CSS. I know for a fact the cause of the problem is from the DIV showing the border like tect normally does in html (blue then purple if its been clicked). The text hyperlinks behave correctly under the code in the html document

    Code:
    a:link { 
    	color:#4E5647;
    	text-decoration:none;
    }
    a:visited { 
    	color:#4E5647;
    	text-decoration:none;
    	border-style: none
    }
    
    a:hover {
    	color: #5D8B1B;
    	text-decoration: none;
    	background-color: transparent;
    	border-color: #5D8B1B;
    	border-bottom-width: 1px;
    	border-left-width: 0px;
    	border-right-width: 0px;
    	border-top-width: 0px;
    	border-style: dotted;
    }
    So why does the div have the border around it because it is a hyperlink? In other words how do i make the "a:link" effects work on the div versus text???
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2008
    Posts
    24
    Rep Power
    0
    try

    border: 0;

    instead of

    border-style: none;
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2008
    Posts
    6
    Rep Power
    0
    No luck problem still there :/
  10. #6
  11. The Signal:: It's everywhere!
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2007
    Location
    Sydney
    Posts
    549
    Rep Power
    497
    Originally Posted by itxtme
    No luck problem still there :/
    Add this to the bottom of your CSS:
    Code:
    img {
    	border: 0px;
    }
    Check out my Blog site if you want a good laugh, Google travelingwebguy or..
    The Official TravelingWebGuy
    Business site => New Blog Site
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2008
    Posts
    6
    Rep Power
    0
    Many thanks, that did the trick!
  14. #8
  15. The Signal:: It's everywhere!
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2007
    Location
    Sydney
    Posts
    549
    Rep Power
    497
    Originally Posted by itxtme
    Many thanks, that did the trick!
    No problem! Glad it worked!

    **Note for next time
    I always start my CSS with some common styles, ie: the img border, anchor underlines, div padding/margin, font settings, and body settings.
    Check out my Blog site if you want a good laugh, Google travelingwebguy or..
    The Official TravelingWebGuy
    Business site => New Blog Site

IMN logo majestic logo threadwatch logo seochat tools logo