Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   Current/Active page link won't reflect style (http://forum.bytesforall.com/showthread.php?t=21180)

striped aardvark Nov 22, 2013 12:38 PM

Current/Active page link won't reflect style
 
http://specializednde.com/ is the site i'm working on. i've used just standard links (h4) in a widget for the top menu, as the menu needed to be bottom aligned with the logo beside it, and this seemed the easiest solution. i've styled the links as follows, but for some reason the active link will not stay background-coloured. is it being affected in some way by the default widget stylings maybe?


h4 a:link {color:#0065B3; background-color: #FFFFFF; padding: 5px; !important;} /* unvisited link */
h4 a:visited {color:#FFFFFF; background-color: #FFFFFF; padding: 5px; !important;} /* visited link */
h4 a:hover {color:#FFFFFF; background-color: #BECFE1; padding: 5px; !important;} /* hover link */
h4 a:active {color:#FFFFFF; background-color: #BECFE1; padding: 5px; !important;} /* selected link */

or is there some way to use the logo option in atahualpa and still have the regular menu align across from it, as the site currently looks?

many thanks for any input!

joan

juggledad Nov 22, 2013 01:41 PM

once you 'click' the link, you are sent to a new page and that link stops being active. what you need to do is target a class assigned to it.

When using the wp custom menus or Atahualpa menus, the menu item you clicked on will get a class of 'current-item' (I think that's the class - you need to use FireBug to look at it or view the page source.) and you can target that in your CSS.

lmilesw Nov 24, 2013 07:47 PM

Also "active" in CSS referts to the element when it is clicked on. Once you realease the mouse button the state for the link is no longer active.


All times are GMT -6. The time now is 02:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.