RJM62
Touchdown! Greaser!
- Joined
- Jun 15, 2007
- Messages
- 13,157
- Location
- Upstate New York
- Display Name
Display name:
Geek on the Hill
I took over this site several years ago. It was a low-budget re-write. The client liked the design, but it was utterly invisible to search engines because the original designer used some homegrown nav scripts that search engines found incomprehensible.
I basically cleaned up the nav links and cleaned up the worst of the code when I took it over, and now he gets about 400 unique visitors a day and is in the top three on Google on almost all relevant searches. But the ugly code has always bothered me, so I want to do another rewrite.
So I was playing with ideas for the animal galleries (the present ones are horrid), and this is what I came up with:
http://www.ridacritter.com/newsite/demo_gallery.html
Nothing earth-shattering, but kinda neat, especially because it's all CSS. Still needs some fine-tuning, but I do like the effect and that fact that there's no JS.
Here's the relevant CSS:
and my working HTML (I'll probably wind up using PHP, but this is my sandbox stuff):
Like I said, nothing earth-shattering; probably a million people have done it before. I just thought it was a nice, lightweight CSS effect that draws the mouse and the eye pretty well. Some of the CSS probably is superfluous; but I've worked enough for one day. I'll tweak in the morning.
Good night, all.
-Rich
I basically cleaned up the nav links and cleaned up the worst of the code when I took it over, and now he gets about 400 unique visitors a day and is in the top three on Google on almost all relevant searches. But the ugly code has always bothered me, so I want to do another rewrite.
So I was playing with ideas for the animal galleries (the present ones are horrid), and this is what I came up with:
http://www.ridacritter.com/newsite/demo_gallery.html
Nothing earth-shattering, but kinda neat, especially because it's all CSS. Still needs some fine-tuning, but I do like the effect and that fact that there's no JS.
Here's the relevant CSS:
Code:
#gallery {
position: relative;
margin-left: 0;
width: 95%;
display: inline-table;
font-size: 9px;
}
#gallery li {
display: inline;
float: left;
width: 100px;
height: 160px;
margin: 7px;
text-align: center;
}
#gallery li:hover p {
visibility: hidden;
}
#gallery img:hover {
border: #000000 1px solid;
height: 150px; width: auto;
position: relative;
bottom: 40px;
right: 45px;
z-index: 2;
}
#gallery img {
z-index: 1;
height: 75px; width: auto;
}
#gallery li p {
text-align: center;
margin:10px 0;
width: 100px;
}
HTML:
<div id="gallery">
<ul>
<li> <a href="Images/squirrels/2_caught_grey_squirrels.jpg" target="_blank"><img src="Images/squirrels/thumbs/2_caught_grey_squirrels.jpg" alt="" width="200" height="150" border="0"/></a>
<p align="center">Sample caption, created entirely with CSS. </p>
</li>
<li><img src="Images/squirrels/thumbs/3_young_squirrels.jpg" height="150" width="200" alt=""/>
<p>There are no tables or td's, so the pages are lighter, </p>
</li>
<li><img src="Images/squirrels/thumbs/albino_squirrel.jpg" height="150" width="200" alt=""/>
<p>And the content density is higher, </p>
</li>
<li><img src="Images/squirrels/thumbs/atlanta1.jpg" height="75" width="100" alt=""/>
<p>which should result in higher keyword density. </p>
</li>
<li><img src="Images/squirrels/thumbs/baby_squirrel.jpg" height="75" width="100" alt=""/>
<p>Notice that the gallery rearranges itself </p>
</li>
<li><img src="Images/squirrels/thumbs/Damaged_electrical_wires_Decatur.jpg" height="75" width="100" alt=""/>
<p>when the page is resized. </p>
</li>
<li><img src="Images/squirrels/thumbs/columbus1.jpg" height="100" width="75" alt=""/>
<p>Caption </p>
</li>
<li><img src="Images/squirrels/thumbs/columbus02.jpg" height="150" width="200" alt=""/>
<p>Caption</p>
</li>
<li><img src="Images/squirrels/thumbs/squirrel008.jpg" height="150" width="200" alt=""/>
<p>Caption</p>
</li>
<li><img src="Images/squirrels/thumbs/creative_ladder_work.jpg" height="150" width="200" alt=""/>
<p>Caption</p>
</li>
<li><img src="Images/squirrels/thumbs/squirrel_exclusion_McDonough_med.jpg" height="150" width="200" alt=""/>
<p>Caption</p>
</li>
<li><img src="Images/squirrels/thumbs/young_grey_squirrel_attic.jpg" height="150" width="200" alt=""/>
<p>Caption</p>
</li>
</ul>
</div>
<p> </p>
</div>
Good night, all.
-Rich
Last edited: