The Way to Programming
The Way to Programming
How to use ‘cp_current’ class to apply on every ‘a tag’ whenever the
CSS
#main_nav { width: 950px; margin: 20px 20px 0 19px; border-radius: .3em .3em 0 0; text-shadow: 0.5px 0.5px 0.5px #000; font-size: 10.5px; text-transform: uppercase; font-weight: bold ; font-variant: normal; } #main_nav ul,li {margin: 0; padding: 0 ; list-style: none; float: left; height: 32px; } #main_nav ul { background: #656565; border-radius: .3em .3em 0 0; width: 100%; } #main_nav li a { display: block; line-height: 3em; padding: 0 2em; color: white; text-decoration: none; height: 32px; } #main_nav li a:hover { display: block; height: 32px; background-color: #900; } #main_nav li a.cp_current, #main_nav li a.cp_current:active { background: #fff; color: #656565; padding-top: 3px; border-radius: .3em .3em 0 0; margin-top: -3px; cursor: default; border-left: solid #e2e2e2 1px; box-shadow: 2px -1px 1px rgba(0, 0, 0, 0.5); text-shadow: none; background: #ffffff; /* Old browsers */ /* IE9 SVG, needs conditional override of 'filter' to 'none' */ background: url(data:image/---); background: -moz-linear-gradient(top, #ffffff 45%, #e2e2e2 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(45%,#ffffff), color-stop(100%,#e2e2e2)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #ffffff 45%,#e2e2e2 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, #ffffff 45%,#e2e2e2 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, #ffffff 45%,#e2e2e2 100%); /* IE10+ */ background: linear-gradient(to bottom, #ffffff 45%,#e2e2e2 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f8f8f8',GradientType=0 ); IE6-8 */}
HTML
Sign in to your account