0

Currently when I hover over my buttons it changes color which is perfect. It goes from a lighter blue to a darker blue. When I click a button on the menu I want it to stay dark blue depending on what page I am on. Is this possible? Let me know if I need to add more code

HTML

<nav>
    <ul id="menu_wrap" class="Blue">
        <li class="button"><a href="Default.aspx" id="manage">Manage Report</a></li>
        <li class="button"><a href="Item.aspx">Create New Item</a></li>
        <li class="button"><a href="CloneReport.aspx">Clone Report</a></li>

    </ul>
</nav> 

CSS

#menu_wrap {
   position: relative;
   margin-top: 20px;
   margin-left: auto;
   margin-right: auto;
   padding: 0;
   padding-right: 0px;
   width: 100%;
   height: 40px;
   list-style-type: none;
   -webkit-border-radius: 10px;
   -moz-border-radius: 10px;
    border-radius: 10px;
    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.2);
    -moz-box-shadow: 0 1px 3px rgba(0,0,0,.2);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.button a {
    cursor: pointer;
    text-align: center;
    font: 13px/100% Arial, Helvetica, sans-serif;
    font-weight: bold;
     position: relative;
    min-width: 50px;
    height: 20px;
    float: left;
    padding: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    text-decoration: none;
    text-shadow: 0 1px 1px rgba(0,0,0,.3);
}

a#manage {
    color: #fff;
    background: #930;
}

.button:first-child a {
    -webkit-border-top-left-radius: 10px;
    -webkit-border-bottom-left-radius: 10px;
    -moz-border-topleft-radius: 10px;
    -moz-border-bottomleft-radius: 10px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.Blue, .Blue .button a {
    color: #d9eef7;
    background: #00adee;
    border-right: solid 1px #0078a5;
    background: -moz-linear-gradient(top, #00adee 0%, #0078a5 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#00adee), color-stop(100%,#0078a5));
    background: -webkit-linear-gradient(top, #00adee 0%,#0078a5 100%);
    background: -o-linear-gradient(top, #00adee 0%,#0078a5 100%);
    background: -ms-linear-gradient(top, #00adee 0%,#0078a5 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00adee', endColorstr='#0078a5',GradientType=0 );
    background: linear-gradient(top, #00adee 0%,#0078a5 100%);
}

.Blue .button a:hover, .Blue .button a:focus {
    background: #0095cc;
    background: -moz-linear-gradient(top, #0095cc 0%, #00678e 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#0095cc), color-stop(100%,#00678e));
    background: -webkit-linear-gradient(top, #0095cc 0%,#00678e 100%);
    background: -o-linear-gradient(top, #0095cc 0%,#00678e 100%);
    background: -ms-linear-gradient(top, #0095cc 0%,#00678e 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0095cc', endColorstr='#00678e',GradientType=0 );
    background: linear-gradient(top, #0095cc 0%,#00678e 100%);
}

.Blue .button a:active {
    background: #0078a5;
    background: -moz-linear-gradient(top, #0078a5 0%, #00adee 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#0078a5), color-stop(100%,#00adee));
    background: -webkit-linear-gradient(top, #0078a5 0%,#00adee 100%);
    background: -o-linear-gradient(top, #0078a5 0%,#00adee 100%);
    background: -ms-linear-gradient(top, #0078a5 0%,#00adee 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0078a5', endColorstr='#00adee',GradientType=0 );
    background: linear-gradient(top, #0078a5 0%,#00adee 100%);
}

.button:last-child a {
    float: left;
    border: none;
    -webkit-border-top-right-radius: 10px;
    -webkit-border-bottom-right-radius: 10px;
    -moz-border-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}
user3339242
  • 631
  • 2
  • 15
  • 32
  • @Quentin Ive updated my code for some reason it works only in Chrome and not Firefox – user3339242 Aug 27 '14 at 13:36
  • I was able to find my answer with http://stackoverflow.com/questions/1762506/find-a-unorderedlist-ul-control-inside-a-master-page-from-a-content-page-in-as – user3339242 Aug 29 '14 at 16:19

0 Answers0