phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


CSS - Web Design: trick make up link navigation with blink image

Tag: css, web design   Category: CSS
post: 09 Nov 2007 read: 1,224


You can see link in categories block in this site. When your mouse over that link, image beside link will be more light. It is simple trick with css. I will explain step by step how do I make this link.
I use Adobe Fireworks CS3, but you can other image editor. Follow the steps:
  1. Open Fireworks. Create new document by click File > New on menu. You will get dialog box.
  2. Define item at dialog box like following images (16 X 100 px, transparent): Click Ok button.
  3. Put your small icon (ex. 14 X 11 px) on top of document. Position Y:4, X:1 ( or make sure the image on center position ).
  4. Click the image (small icon).
  5. Change opacity, will be 60.
  6. Put again the same small icon on bottom of document. Position Y:84.
  7. In Optimize, define item value like following image:
  8. Save and named "icon_folder.gif".
  9. Create a new file, named "test-css.html". Enter following code:
    
    <html>
    <head>
    
    </head>
    <body>
    <a href="#" id="category">CSS</a>
    </body>
    </html>
    
    This is basic html. We use id named "category".
  10. Insert following css ( see bold code ):
    
    <html>
    <head>
    <style type="text/css">
    <!--
    #category {
      text-decoration:none;
      color:#FF6600;
      padding-left:20px;
      background: no-repeat url(icon_folder.gif);
      background-position:0px 0px;
    }
    
    #category:hover {
      color:#FF0000;
      text-decoration:underline;
      background-position:0px -80px;
    }
    -->
    </style>
    </head>
    <body>
    <a href="#" id="category">CSS</a>
    </body>
    </html>
    



| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
mod_rewrite - Part 1: create your "fantasy" URL

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting