November 6, 201214 yr Hi! Asking for some help from more experienced users. I need to create active menu based on images. Main idea: all menu elements have own picture. while put mouse cursor on any menu element picture changes. And the hardest for me - when you click any menu element, join certain page - all other pictures stay the same as at the beginning, apart one which is associated with this active at the moment page. It changes to a special one. This helps to understand what menu section is active at the moment. Here is the code of css I used. I can't realize third step - link third image to an active page (website section). .gmenu1 { background: url('img1.jpg') 0 0 no-repeat; float: left; overflow: hidden; width: 180px; height: 270px; padding-right: 10px; } .gmenu1:hover { background: url('img1a.jpg') 0 0 no-repeat; float: left; overflow: hidden; width: 180px; height: 270px; padding-right: 10px; } .gmenu2 { background: url('img2.jpg') 0 0 no-repeat; float: left; overflow: hidden; width: 180px; height: 270px; padding-right: 10px; } .gmenu2:hover { background: url('img2a.jpg') 0 0 no-repeat; float: left; overflow: hidden; width: 180px; height: 270px; padding-right: 10px; } .gmenu3 { background: url('img3.jpg') 0 0 no-repeat; float: left; overflow: hidden; width: 180px; height: 270px; padding-right: 10px; } .gmenu3:hover { background: url('img3a.jpg') 0 0 no-repeat; float: left; overflow: hidden; width: 180px; height: 270px; padding-right: 10px; } Edited November 6, 201214 yr by LordNighten
November 6, 201214 yr You can do it with matched pairs (each link has a class or id and each page body or menu parent div has a different class or id and when the link matches the page, the background changes), or you can use PHP. Items 3 and 4 here http://www.wickham43...ghlighthome.php use background images and if you go from the home page to the services page you will see the orange tab change. Edited November 6, 201214 yr by Wickham
November 6, 201214 yr Author Item 4 looks reasonable and suitable for me. I just need to find out how to get page title in CMS I use.
Create an account or sign in to comment