In this case, hovering over the left link makes a tiny dash appear to its right (between the two links). How can I get rid of this? I see this in Safari and Chrome both, but I don't see anything in the style sheet that would make it do this.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Walls</title>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" href="custo.css">
<script src="prettyPhoto_compressed_3/js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="prettyPhoto_compressed_3/css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />
<script src="prettyPhoto_compressed_3/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
</head>
</head>
<body>
<br>
<a href="gallery.html">
<img src="test.jpg" class="testclass" alt="test" width="170" />
</a>
<a href="info.html">
<img src="test.jpg" class="testclass" alt="test" width="55" />
</a>
<div class="container-fluid">
<br>
</div><!-- .container -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" charset="utf-8"> <!--initialize prettyPhoto-->
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>
</body>
</html>
If you're seeing the same thing I'm seeing (I don't have all the style sheets), you're seeing the underline of the a
tag for the image.
You can just remove that using text-decoration: none
on your image links;
<a href="gallery.html" style="text-decoration: none !important;">
The !important
at the end of the style helps to override any selectors in your css which may have already have an !important
emphasis.
Of course this is in practice better done using a class that you set on your image links.
This is an old post, but I would like to contribute to something. This will help other people why the dash (-) appears.
This is because there is an empty space inside the a tag. For example:
<a href="#">
<i>test</i>
</a>
If you set your line like this: <a href="#"><i>test</i></a>
the dash/underline will disappear, but some tools might still format your code and they will add the space. So, using the css mentioned in the previous post will eliminate the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With