iNET Interactive - Online Advertising Agency
          
   Home    Authors    About    Login    Contact Us
   Search:   
Advanced Search     
  Articles

  Directories (11)
  Google (117)
  Interviews (9)
  Keywords (30)
  Link Development (40)
  Marketing (48)
  Meta Tags (7)
  Optimization (112)
  Promotion (30)
  SE News (855)
  Spiders & Robots (22)
  Submission (8)
  Traffic Analysis (6)
  Tools (7)
  Algorithm (11)
  PPC (17)
  Domain Names (6)
  SEO Services (40)
 
Want to receive new articles via e-mail? Click here!
/Home /Optimization

CSS Rollover Buttons 

  Views:    2305
  Votes:    8
by Mark Angeletti 4/27/04 Rating: 

Synopsis:

The most search engine friendly navigation system around.
Pages: 
The Article

There are many different button-rollover tutorials available on the web, some JavaScript and some CSS, but none of the ones I have seen yet match that of the Trifecta button. Let's start with what makes the CSS rollover Trifecta button different from the many other rollovers you may have already seen.

Why's it called the Trifecta button anyway?

Trifecta is a betting term in which the bettor must pick the first three winners in the correct sequence - this CSS button has 3 key features that separate it from the rest and make it a winner. Let's have a look:

Graphics and Text - The Best of Both Worlds

It is well known that search engines give greater value to text links than that of just images. Our CSS button allows for both a graphical image to swap based on mouse state and text to be within the link. This gives us the best of both worlds - a nice graphical image swap for our viewers and text for the search engines. Yes, many other CSS buttons do this too, but read on.

No Flicker and No Preloader

This next one is big and is where many other CSS rollover buttons fail. Internet Explorer is unable to cache background images which causes the button to flicker as it's loaded. You may have to look close in order to notice this. Try this on other CSS rollover tutorials that swap images, like this example -- Open another browser and place it on top of the browser with the buttons, size the browser so you can still see the rollover buttons and the second browser. Now run your mouse up and down the buttons and what you may notice is a little flicker and even see the hourglass where the button hasn't been loaded yet. Depending on the speed of you connection you may have to look close. This is a common problem for many CSS buttons and no preloading of images will help. With the Trifecta button you don't have this problem and no preloading is necessary.

What makes the Trifecta button the Trifecta?

This next feature is what really seperates the Trifecta button from the rest. You know that having the title attribute in your href-tags is a good thing for the search engines, right? You also know that having the alt attribute in your image-tags is a good thing for search engines. And of course you know that the anchor text for a link is very important for search engines, but did you ever think you could get all three of these key elements in a single link? Well all 3 of these search engine friendly features are present in the Trifecta button - thus making the winning 3 combo. Let's have a look at the code.

The Code

.cssnav {
position: relative;
font-family: arial, helvetica, sans-serif;
background-image: url(overbtn.jpg);
background-repeat: no-repeat;
white-space: nowrap;
display: block;
width: 211px;
height: 44px;
margin: 0;
padding: 0;
}

.cssnav a {
display: block;
color: #000000;
font-size: 11px;
width: 211px;
height: 44px;
display: block;
float: left;
color: black;
text-decoration: none;
}

.cssnav img {width: 211px; height: 44px; border: 0; }
* html a:hover {visibility:visible}
.cssnav a:hover img{visibility:hidden}

.cssnav span {
position: absolute;
left: 35px;
top: 15px;
margin: 0px;
padding: 0px;
cursor: pointer;
}


//CODE FOR BUTTONS

<div class="cssnav"> <a href="http://path.com" title="your_keyword"> <img src="downbtn.jpg" alt="your_keyword" /> <span> your_keyword </span> </a> </div>

Here is a working example of the above code.
Also here is a horizontal
example.

Summary

The CSS rollover Trifecta button allows us to swap images on mouse state while still keeping text in our link allowing us the best of both worlds - graphics for our human viewers and text for the spiders. The Trifecta button also deals with IE's inability to cache background images. Lastly, the Trifecta button naturally encourages your keyword(s) to be placed 3 times within any given link.

Thanks to Paul O'Brien and Gavin Benda for their work in the development of the Trifecta button

Article by: Mark Angeletti of http://www.search-this.com

Pages: 



 
  Sponsors