Jump to content

Can't get my a:hover styled right


Go to solution Solved by cyberRobot,

Recommended Posts

post-77950-0-26105700-1378143443_thumb.png

 

Hi - I'm normally pretty good with css, but this time I am defeated. All I want is the white background behind the Navigation label extends right across the dropdown box. I have done the usual: checked the padding and margin. Also tried extending the width of the a tag and nothing works. When I make changes to these css selectors in Firebug they get crossed through. However, I can not see any other active value in the Firebug css listing which impacts the background color. 

 

Ok - you can not see the rest of the css style sheet, but under normal conditions what usually works  given that each Nav label is slightly different in length ?? 

 

Many Many Thanks ! 

Link to comment
https://forums.phpfreaks.com/topic/281793-cant-get-my-ahover-styled-right/
Share on other sites

For the fly-out menu links (the bulletin, etc.), have you tried adding the "display:block;" declaration. You'll also need to define the width so the anchor tag doesn't exceed the underlying box. This should expand the clickable area so visitors don't need to click the text.

Hi Guys - Many thanks for your advice so far. But sadly I continue to fail in getting it right. I have just today put the pre-production site up on a subdomain: 

http://parish.jacobssoftwareanddesign.com/

 

Can you have a look at the drop down "the parish" and see what stupid thing I am misssing on the sub menu - all I want is that the white background extends across the width of the dropdown when you hover over it. 

 

Many Many Thanks !! 

  • Solution

Now I didn't look at all the CSS, but the menu seems to work with the following changes:

  • Under ".dropdown-menu li a", add "width:205px;"
  • Under "#menu a", change the text-align property to "left"
  • Add a ".dropdown-menu li a:hover" option and add "width:205px;"

Note that I don't know what that does with the rest of the website. You'll have some cleaning up to do...and some testing.

Edited by cyberRobot
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.