CSS 5
Code Snippets
My Fancy Rollover Buttons
a.rollover {position:relative;display:block;width:220px;height:110px;text-decoration: none;background:url('http://cdn.obsidianportal.com/assets/160769/GlowLettersRollover.png');background-color:transparent;}
a.rollover:hover {background-position:-220px 0px;}
.overtext {position:absolute;top:34%;left:0px;text-align:center;width:220px;color:darkorange;}
.overtext:hover {color:orange;}
<a href="http://url-to-your-page-here" class="rollover"><span class="overtext">Your Text</span></a>
Explanation
Background Rollover Image

The other thing about this graphic, is for my personal preference there’s a 50% transparent black background. This allows any text I put over the button to have a darker background. That’s a personal preference.
Overtext
The Overtext is the actual text of the button. I prefer hard coding the full URL rather than use the Obsidian Portal dynamic wiki links method because sometimes I want the text on the button to be slightly different from the page name, and I don’t want there to be a conflict between Obsidian Portal markup and pure HTML.
Now, MY overtext is fancier than the one I listed above. It has a font-family value set and a drop shadow. You can do anything with it that you can do with regular HTML text.
Layered Background Images
That’s still the same rollover and overtext from before. However, now I have an image behind it. I use images that are already found elsewhere on the site, if the user browses my site regularly then they’ve already been downloaded by the browser to their local machine… so I just put them to use as buttons.The code is really simple. Just put the link, inside a div, and set the div to have a background image that you move around via the background-position feature.
So you can see why I use a 50% transparent background, the image I am using is displayed in this box. If I didn’t darken the image, my Overtext would have to be an even brighter color – which might take away from my visual theme.
<div style="height:110px;width:220px;background:url('URL-TO-YOUR-IMAGE-HERE');background-position:-18px -73px;">THE-AHREF-AND-SPAN-FOR-YOUR-ROLLOVER-GOES-HERE</div>
My Triple Box
The only thing I want to explain in detail first is the background image. That’s my absolute basic default image when I create a triple box. It’s those books. In this way, I always have a graphic even if I don’t have a link to put there yet. You don’t need it.
.tribox {position:relative;left:0px;width:684px;height:122px;padding:0px;margin:0px;margin-bottom:5px;text-align:center;background-color:none;vertical-align:middle;}
.tribox.left {position:absolute;left:0px;top:3px;width:220px;height:110px;background-color:white;border-style:solid;border-width:2px;background-image:url('http://cdn.obsidianportal.com/assets/160661/BookbacksDark.jpg');}
.tribox.center {position:absolute;left:230px;top:3px;width:220px;height:110px;background-color:white;border-style:solid;border-width:2px;border-color:black;padding:0px;background-image:url('http://cdn.obsidianportal.com/assets/160661/BookbacksDark.jpg');}
.tribox.right {position:absolute;left:460px;top:3px;width:220px;height:110px;background-color:white;border-style:solid;border-width:2px;border-color:black;padding:0px;background-image:url('http://cdn.obsidianportal.com/assets/160661/BookbacksDark.jpg');}
You’ll set your background image and the rollover yourself. Oh, and change the position to move it all around of course.
<div class="tribox">
<div class="tribox left" style="background:url('');background-position:-0px -0px;">YOUR-ROLLOVER-HERE</div>
<div class="tribox center" style="background:url('');background-position:-0px -0px;">YOUR-ROLLOVER-HERE</div>
<div class="tribox right" style="background:url('');background-position:-0px -0px;">YOUR-ROLLOVER-HERE</div>
</div>
<div class="tribox">
<div class="tribox left">YOUR-ROLLOVER-HERE</div>
<div class="tribox center">YOUR-ROLLOVER-HERE</div>
<div class="tribox right">YOUR-ROLLOVER-HERE</div>
</div>
