|
|||||||
| CSS Discussion and technical support relating to Cascading Style Sheets. |
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
|||
|
|||
|
it is working for me, BTW why don't you try
a:hover { border:none; |
|
#3
|
||||
|
||||
|
ah! the code I've posted is working? which browser are you using?
__________________
La situazione è disperata ma non grave |
|
#4
|
|||
|
|||
|
me using ie 7, FF3.2 or chrome.. did u try broder:0? or none
|
|
#5
|
||||
|
||||
|
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 |
|
#6
|
|||
|
|||
|
No problem, try and let us know if u face problem again, ll happy to help
|
|
#7
|
||||
|
||||
|
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 |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|