You are here: Re: I'm trying to make a css menu... « HTML « IT news, forums, messages
Re: I'm trying to make a css menu...

Posted by meltedown on 12/20/10 11:35

greg wrote:
> Looks like that below but... how can I make a pressed link to stay in
> different color so the person knows where actually is on the web site.
>
> For some unknown to me reason that id is not working for me.
>
> Any idea?
>
> TIA...
>
> -------------------------------
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html><head>new</title>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
> <style>
>
> #lftColm {width:197px; vertical-align:top;}
>
> #lftNav {margin:22px 2px 0 2px;}
>
> #lftNav A:link, #lftNav A:visited
> {
> margin-top:1px;
> padding:4px 4px 4px 8px;
> font-weight:bold;
> text-decoration:none;
> font-size:11px;
> font-family:Arial, Helvetica, sans-serif;
> display:block;
> border-style:solid;border-width:0px 1px 1px 6px;
> border-color:#FFF #B7B7B7 #D7D7D7 #f0f;
> color:navy;
> background-color:#fff;
> }
> #lftNav A:active, #lftNav A:hover
> {border-left-color:#0A7ACD;color:red;background-color:#dff;}
> #sel A:hover, #sel A:active
> {background-color:#ffc;}
>
> </style>
>
> <title>New Page 1</title>
> </head>
>
> <body>
> <table border="0" cellpadding="0" cellspacing="0" width="22%">
> <tbody><tr>
> <td id="lftColm" width="220">
> <div id="lftNav">
> <a id="sel" href="#" title="Computer Equip">Home</a>
> <a href="#" title="Notebook">Notebooks</a>
> <a href="#" title="Internet Security">Prices</a>
> <a href="#" title="Broadband">Services</a>
> <a href="#" title="Domain">Broadbands with WestNet</a>
> <a href="#" title="Printer">Contakt</a>
> <a href="#" title="Web Hosting">Links</a>
> <a href="#" title="Anti Virus">Anti Virus Software</a>
> </div>
> </td>
> </tbody></table>
>
> </body>
>
> </html>
#sel A:hover, #sel A:active
{background-color:#ffc;}

This will only take effect if you are hovering or if the link is active.
If you want the backgorund color to show otherwise, they you need to put
the style on the anchor itself.
#sel a{background-color:#ffc;}

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация