Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-14-2012, 05:15 PM   PM User | #1
andwfara1
New Coder

 
Join Date: Mar 2012
Posts: 35
Thanks: 12
Thanked 0 Times in 0 Posts
andwfara1 is an unknown quantity at this point
Exclamation CSS3 Dropdown Menu Issues

I’ve added the following code to my site ( http://webdesignerwall.com/tutorials/css3-dropdown-menu ); here’s a copy of my CSS – http://pastebin.com/Dn38bB0Y

On the site, when I hover over the LI that is supposed to “drop” it puts the dropdown list in the top left corner – if I change the positioning from ABSOLUTE to REALTIVE it puts the menu in the “right” location, but it acts as if there is a space for it, stretching the menu and moving the last top-level item to a second row.

The demo of the site can be found here - http://webbetasite.com/family

Please help,

Thanks
andwfara1 is offline   Reply With Quote
Old 11-14-2012, 06:07 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello andwfara1,
Look what happens when you make the parent li relative:
Code:
#header-container #header-content .top-nav ul.menu li.menu-item, #header-container #header-content .top-nav ul.menu li.current-menu-item {
    color: #5F4D5A;
    float: left;
    font-family: Arial;
    font-size: 12px;
    height: 20px;
    margin-left: 3px;
    margin-right: 10px;
    position: relative;
}
You will need to be more specific as that bit I posted made everything relative and you only want that one li to be relative.
You will also need to adjust the positioning of the dropped ul since top: 50px; isn't quite right.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

Last edited by Excavator; 11-14-2012 at 06:09 PM..
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
andwfara1 (11-14-2012)
Old 11-14-2012, 06:45 PM   PM User | #3
andwfara1
New Coder

 
Join Date: Mar 2012
Posts: 35
Thanks: 12
Thanked 0 Times in 0 Posts
andwfara1 is an unknown quantity at this point
I added Position:relative to the LI you suggested and nothing changed - am I missing something?
andwfara1 is offline   Reply With Quote
Old 11-14-2012, 06:51 PM   PM User | #4
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Your dropped ul is not in the upper left corner anymore. Am I missing something?
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 11-14-2012, 06:55 PM   PM User | #5
andwfara1
New Coder

 
Join Date: Mar 2012
Posts: 35
Thanks: 12
Thanked 0 Times in 0 Posts
andwfara1 is an unknown quantity at this point
nvm - chrome was displaying cached content - sorry about that thanks for the help!!
Love learning something new every day.
andwfara1 is offline   Reply With Quote
Old 11-14-2012, 07:08 PM   PM User | #6
andwfara1
New Coder

 
Join Date: Mar 2012
Posts: 35
Thanks: 12
Thanked 0 Times in 0 Posts
andwfara1 is an unknown quantity at this point
do you know how i can make it so that when SERVICES dropdown is active that the hover state that shows the "tab" remains highlighted?
andwfara1 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:02 AM.


Advertisement
Log in to turn off these ads.