Solved

Problem with li:hover

Posted on 2013-01-17
4
196 Views
Last Modified: 2013-01-22
I have a problem with my menu. I am trying to make a hover a different color.
If I do a:hover, the background color is too small.
If I do li:hover, the color is too big.
Is there a middle ground, like using margin and padding?
If I add it to the :hover state, the item grows on hover instead of staying the same size and just making colors.
You can view it here:
http://ytcdenver.org/about-the-yeshiva
0
Comment
Question by:rivkamak
4 Comments
 
LVL 12

Assisted Solution

by:sivagnanam chandrakanth
sivagnanam chandrakanth earned 250 total points
ID: 38791432
on li:hover you have background image, try adjusting its height
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 38792031
you can use any positioning attributs like margin, padding width, length for pseudo elemnts like li:hover too
0
 
LVL 30

Accepted Solution

by:
LZ1 earned 250 total points
ID: 38792834
Try adjusting your height on the #nav ul li to 36px.  

Then(just as a helper) give your #nav ul li ul a property of top:32px
0
 

Author Comment

by:rivkamak
ID: 38797724
Now that I adjusted those setting, the submenu doesn't stay still. It's hard to get it to stay popped open when you hover over it . It jumps too fast.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question