www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > CSS

    CSS Discussion and technical support relating to Cascading Style Sheets.

    Reply
     
    Thread Tools Rate Thread Display Modes
      #1  
    Old 02-09-2010, 03:48 PM
    alexthecatta's Avatar
    alexthecatta alexthecatta is offline
    mamma butta la pasta!
     
    Join Date: Aug 2004
    Location: Italy
    Posts: 182
    resolved [RESOLVED] text link replaced with background img: how to add border?

    I've replaced a text link with a background img. I want to display a border around the image and get the border to disappear for a:hover. Here is the HTML/CSS and the way (that do not work) that I'm following. Any idea? thanks!

    HTML Code:
    <a href="ITA/index.html"><h2 class="ita"><span>versione italiana</span></h2></a>
    Code:
    h2 span {
    	display:none;}
    	
    h2 {
    	width:64px;
    	height:29px;
    	background-image:url(../img/versioneItaliana.png);
    	background-repeat:no-repeat;
    }
    	
    a:link, a:visited, a:active, a:hover {
    	display:block;
    	width:64px;
    	height:29px;
    	border:#333 1px solid;
    }
    
    a:hover {
    	border:#FFF 1px solid;
    }
    __________________
    La situazione è disperata ma non grave
    Reply With Quote
      #2  
    Old 02-10-2010, 03:03 AM
    lohumihem lohumihem is offline
    Registered User
     
    Join Date: May 2006
    Posts: 151
    it is working for me, BTW why don't you try
    a:hover {
    border:none;
    Reply With Quote
      #3  
    Old 02-10-2010, 03:09 AM
    alexthecatta's Avatar
    alexthecatta alexthecatta is offline
    mamma butta la pasta!
     
    Join Date: Aug 2004
    Location: Italy
    Posts: 182
    ah! the code I've posted is working? which browser are you using?
    __________________
    La situazione è disperata ma non grave
    Reply With Quote
      #4  
    Old 02-10-2010, 03:26 AM
    lohumihem lohumihem is offline
    Registered User
     
    Join Date: May 2006
    Posts: 151
    me using ie 7, FF3.2 or chrome.. did u try broder:0? or none
    Reply With Quote
      #5  
    Old 02-10-2010, 03:31 AM
    alexthecatta's Avatar
    alexthecatta alexthecatta is offline
    mamma butta la pasta!
     
    Join Date: Aug 2004
    Location: Italy
    Posts: 182
    no chance to try now, will do later. Anyway if you say it works I guess I was just making confusion yesterday when testing thanks
    __________________
    La situazione è disperata ma non grave
    Reply With Quote
      #6  
    Old 02-10-2010, 03:38 AM
    lohumihem lohumihem is offline
    Registered User
     
    Join Date: May 2006
    Posts: 151
    No problem, try and let us know if u face problem again, ll happy to help
    Reply With Quote
      #7  
    Old 02-14-2010, 05:07 AM
    alexthecatta's Avatar
    alexthecatta alexthecatta is offline
    mamma butta la pasta!
     
    Join Date: Aug 2004
    Location: Italy
    Posts: 182
    this is the code that works fine. Previous code had some little problem with margin/padding.

    HTML Code:
    <div id="ITA"><a class="ita" href="ita/index.html"><h2><span>versione italiana</span></h2></a></div>
    <div id="ENG"><a class="eng" href="eng/index.html"><h2><span>english version</span></h2></a></div>
    Code:
    h2 span {
    	display:none;}
    	
    #ITA {
    	width:50%;
    	float:left;
    	clear:right;}
    
    #ENG {
    	width:50%;
    	float:right;
    	}
    	
    h2 {
    	width:64px;
    	height:29px;}
    
    .ita {
    	background-image:url(../img/versioneItaliana.png);
    	background-repeat:no-repeat;
    	float:right;
    	margin-right:25px;}
    
    .eng {
    	background-image:url(../img/englishVersion.png);
    	background-repeat:no-repeat;
    	float:left;
    	margin-left:25px;}
    	
    a:link, a:visited, a:active, a:hover {
    	display:block;
    	margin-top:-200px;
    	width:64px;
    	height:29px;
    }
    
    a:link, a:visited, a:active {
    	border:#666 2px solid;}
    	
    a:hover {
    	border:#fff 2px solid}
    __________________
    La situazione è disperata ma non grave
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 01:08 PM.



    Acceptable Use Policy

    Internet.com
    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.