Reputation: 4038
I'm making a navigation menu with background images. I managed to vanish the text with text-indent, but it shows a very ugly border while clicking the link. How do I get rid of the border? My css is gven below;
#menu{
width:670px;
float:right;
}
#menu ul{
padding-top:10px;
}
#menu ul li{
list-style-type:none;
display: block;
float:left;
width:163px;
height:270px;
}
#menu ul li a{
height:270px;
display: block;
width:163px;
text-indent:-9999px;
border:none;
}
.box_1{
background: url(images/box_1.png) no-repeat;
width:163px;
height:268px;
border:none;
}
.box_2{
background: url(images/box_2.png) no-repeat;
width:163px;
height:268px;
border:none;
}
.box_3{
background: url(images/box_3.png) no-repeat;
width:163px;
height:268px;
border:none;
}
.box_4{
background: url(images/box_4.png) no-repeat;
width:163px;
height:268px;
border:none;
}
And my html:
<div id="menu">
<ul>
<li><a class="box_1" href="#">creative solutions</a></li>
<li><a class="box_2" href="#">dynamic development</a></li>
<li><a href="#" class="box_3">unlimited opportunities</a></li>
<li><a class="box_4" href=#">exceptional approach</a></li></ul>
</div>
Thanks in advance for helping!!
Upvotes: 0
Views: 6183
Reputation: 830
Try this line on the top of your css file,
* :focus { outline: 0; }
Upvotes: 0
Reputation: 170
Probably you are talking about ugly dotted border that is shown up when the element (in your case image) receives focus (by click or by pressing tab).
Use css property:
outline: none;
Upvotes: 0
Reputation: 37543
Apply another css style:
#menu ul li a:active {
border:none;
}
Upvotes: 2