Posts

Showing posts with the label CSS

Styling current page menu link using jQuery

We can easily style the current page url in menubar using jquery. All you have to do is just follow to snippets. [code lang="css"] #menu ul{ list-style-type:none; width:100%; background:#000000} #menu li{padding:5px;display:inline-block} #menu li a{ text-decoration:none; color:#FFFFFF; font-weight:bold} #menu li a:hover{ background:#CCCCCC; color:#000000} #menu li a:active{ background:#CCCCCC; color:#000000} .current-menu{ background:#CCCCCC; padding:6px 5px 5px} .current-menu a{ color:#000000;} [/code] Paste the css it in the header. [code lang="php"] <div id='menu'> <ul> <li><a href="http://localhost/menu/index.php">Home</a></li> <li><a href="http://localhost/menu/products.php">Products</a></li> <li><a href="http://localhost/menu/services.php">Services</a></li> <li><a href="ht...