Results 1 to 9 of 9

Thread: Customize CSS menu to select the cell

  1. #1
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Customize CSS menu to select the cell

    Hi all , i have used the menu on a website i am building but when i click a link and go to the page i cant know the page i am on, i need help so that when i click on a link and i get to the page i need the cell for the page am in to be highlighted like the hover effect to show that am on that page.

    thanks.

  2. #2
    Join Date
    Sep 2008
    Location
    Seattle, WA
    Posts
    135
    Thanks
    1
    Thanked 11 Times in 11 Posts

    Default

    Do you mean you need the menu to show the 'active' page you're on?

  3. #3
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    Code:
    <!-- 
    a1a2a7 : grey
    19b3ff : blue
    -->
    <style>
    a:visited
    {
    	color:#a1a2a7;
    	text-decoration:none;
    }
    a:link
    {
    	color:#a1a2a7;
    	text-decoration:none;
    }
    a:hover
    {
    	color:#19b3ff;
    	font-weight:bold;
    }
    a:active
    {
    	color:#19b3ff;
    	text-decoration:none;
    }
    </style>
    good luck...

  4. #4
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yes i need the menu to show me the active page am on

  5. #5
    Join Date
    Sep 2008
    Location
    Seattle, WA
    Posts
    135
    Thanks
    1
    Thanked 11 Times in 11 Posts

    Default

    You can use davelf's example code which displays a different color of the hyperlink for the active page. Plus, you could also add a background to it as well.

    a:active
    {
    color:#19b3ff;
    text-decoration:none;
    background-color: #000;
    }

    Which would make it stand out even more.

  6. #6
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I tried it but it did not work , where do i include it in the css i copied and pasted below.


    .jqueryslidemenu{
    font: bold 12px Verdana;
    background: #414141;
    width: 100%;
    }

    .jqueryslidemenu ul{
    margin: 0;
    padding: 0;
    list-style-type: none;
    }

    /*Top level list items*/
    .jqueryslidemenu ul li{
    position: relative;
    display: inline;
    float: left;
    }

    /*Top level menu link items style*/
    .jqueryslidemenu ul li a{
    display: block;
    background: #414141; /*background of tabs (default state)*/
    color: white;
    padding: 8px 10px;
    border-right: 1px solid #778;
    color: #2d2b2b;
    text-decoration: none;
    }

    * html .jqueryslidemenu ul li a{ /*IE6 hack to get sub menu links to behave correctly*/
    display: inline-block;
    }

    .jqueryslidemenu ul li a:link, .jqueryslidemenu ul li a:visited{
    color: white;
    }

    .jqueryslidemenu ul li a:hover{
    background: black; /*tab link background during hover state*/
    color: white;
    }

    /*1st sub level menu*/
    .jqueryslidemenu ul li ul{
    position: absolute;
    left: 0;
    display: block;
    visibility: hidden;
    }

    /*Sub level menu list items (undo style from Top level List Items)*/
    .jqueryslidemenu ul li ul li{
    display: list-item;
    float: none;
    }

    /*All subsequent sub menu levels vertical offset after 1st level sub menu */
    .jqueryslidemenu ul li ul li ul{
    top: 0;
    }

    /* Sub level menu links style */
    .jqueryslidemenu ul li ul li a{
    font: normal 13px Verdana;
    width: 160px; /*width of sub menus*/
    padding: 5px;
    margin: 0;
    border-top-width: 0;
    border-bottom: 1px solid gray;
    }

    .jqueryslidemenuz ul li ul li a:hover{ /*sub menus hover style*/
    background: #eff9ff;
    color: black;
    }

    /* ######### CSS classes applied to down and right arrow images ######### */

    .downarrowclass{
    position: absolute;
    top: 12px;
    right: 7px;
    }

    .rightarrowclass{
    position: absolute;
    top: 6px;
    right: 5px;
    }

    .mainnav:link {
    font-family:Helvetica;
    text-decoration: none;
    font-size:11px;
    font-weight:bold;
    color:#ffffff;
    }
    .mainnav:visited {
    font-family:Helvetica;
    text-decoration: none;
    color:#ffffff;
    font-size:11px;
    font-weight:bold;
    }
    .mainnav:hover {
    font-family:Helvetica;
    color:#CCCCCC;
    font-size:11px;
    }
    .mainnav:active {
    font-family:Helvetica;
    font-size:11px;
    text-decoration: none;
    color:#FFFFFF;
    font-weight:bold;
    background-color: #000;
    }

  7. #7
    Join Date
    Sep 2008
    Location
    Seattle, WA
    Posts
    135
    Thanks
    1
    Thanked 11 Times in 11 Posts

    Default

    You need to insert this:

    .jqueryslidemenu ul li a:active{
    background: black; /*tab link background during active state*/
    color: white;// change the font color to what you want
    }

    after this:

    .jqueryslidemenu ul li a:hover{
    background: black; /*tab link background during hover state*/
    color: white;
    }

  8. #8
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    the code that i gave you before, will show the effect when you use the tag <a>.
    for example:
    http://www.dynamicdrive.com/forums/a...1&d=1253335687

    you will see how the link work.

    i give two example:
    the first example, if the link color that you want same all over the page.
    the second example, if the link color that you want have multiple color in one page.

  9. #9
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    really sorry, i misunderstood your question.

    The code that i give is for general :active,a:hover,a:link, and a:visited.

    i don't really sure this will work, in your code. Because as far as i see in your css, there's js include.

    try add, this:

    Code:
    a:active
    {
    	color:#19b3ff; /* font */
    	text-decoration:none;
    	background-color:#19b3ff; /* background */
    }

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •