Reputation: 161
I need help with this small little problem I am having with the site I am building. I have a list of images with links to different websites and everything looks fine for the most part but when I hover over the last one in the row the links below move for some strange reason. I can't figure out!
Imagine this what it looks like at first:
[img1] [img2] [img3]
[img4] [img5] [img6]
This is what happens when I hover over any of the images/links on the right side:
[img1] [img2] [img3]
[img4]
[img5] [img6] [img7]
And this is my code:
.sites{
float:left;
width:215px;
background: #eee;
text-align:center;
margin: 0px 13px 15px 0px;
border: 1px solid #ccc;
padding:10px;
}
.sites p{
margin:0px;
padding:10px;
font:bold;
}
.sites a{
border-bottom: 5px solid #000;
border-top: 5px solid #000;
display:block;
}
.sites a:hover{
border-bottom: #F90;
border-top: #f90;
}
This is my HTML:
<div id="main-content">
<h1> Check out all our DEADicated sites: </h1>
<div class="sites">
<a href="http://www.eyeem.com/TheDEADicated" target="_blank">
<img src="images/sites/eye-em.jpg" width="215" height="150" alt="EyeEm"/></a>
<p> EyeEm </p>
</div>
<div class="sites">
<a href="http://www.facebook.com/DeadSaraArg" target="_blank">
<img src="images/sites/fb-argentina.jpg" width="215" height="150" alt="Facebook Argentina"/></a>
<p> Facebook - Argentina </p>
</div>
<div class="sites">
<a href="https://www.facebook.com/pages/The-DEADicated-Canada/427270554005649?ref=hl" target="_blank">
<img src="images/sites/fb-canada.jpg" width="215" height="150" alt="Facebook Canada"/></a>
<p> Facebook - Canada </p>
</div>
<div class="sites">
<a href="http://www.facebook.com/ThedeadicatedEgypt" target="_blank">
<img src="images/sites/fb-egypt.jpg" width="215" height="150" alt="Facebook Egypt"/></a>
<p> Facebook - Egypt </p>
</div>
<div class="sites">
<a href="http://www.facebook.com/DeadSaraItaly?ref=hl" target="_blank">
<img src="images/sites/fb-italy.jpg" width="215" height="150" alt="Facebook Italy"/></a>
<p> Facebook - Italy </p>
</div>
<div class="sites">
<a href="http://www.facebook.com/thedeadicatedmexico" target="_blank">
<img src="images/sites/fb-mexico.jpg" width="215" height="150" alt="Facebook Mexico"/></a>
<p> Facebook - Mexico </p>
</div>
<br/>
<div class="sites">
<a href="http://www.facebook.com/DeadSaraTheDeadicatedUK" target="_blank">
<img src="images/sites/fb-uk.jpg" width="215" height="150" alt="Facebook UK"/></a>
<p> Facebook - UK </p>
</div>
</br><br><br>
<h2> To join TheDEADicated, click <a href="http://musichype.com/artists/dead-sara" target="_blank">HERE</a>! </h2>
</div>
I'm pretty new to web design. Help please?
Upvotes: 2
Views: 3785
Reputation: 1738
Without html I can't say for sure, but just from your css, your .sites a:hover
rule should be setting border-top-color: #F90; border-bottom-color: #F90;
rather than just border-top and border-bottom.
Upvotes: 1