Forums / Templates, Stylesheets, Page Layout / mod on CSS Horizontal Dropdown

mod on CSS Horizontal Dropdown

Started by familynow on 16 Sep 2011, 11:19 PM · Views: 1,419

Results 1 to 8 of 8
16 Sep 2011, 11:19 PM
#1
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

mod on CSS Horizontal Dropdown

I finally picked the category menu[1] I want for my site[2]. Tweaked it by grabbing the mega-menu style from this[3] and added some personal touch. The only thing I can't seem to figure out is how to change the menu placement; I'm designing my site to be viewable at 1024x768 and up. However, the more I move to the right categories the more the user would need to scroll(at 1024x768) to view the submenu. I've tried to tighten up the allowable width but then the font is either too small or the menus are to bunched together...Either-way I loose the 'userfreindliness' that the mega-menu style offers. I need someone with some css experience to shine-in with more options cuz mine suck since I don't really know what I'm doing.

ref.
[1] familynowDOTcaSLASHshop -sorry, it's not public yet!
[2] CSS Horizontal Dropdown Menu [http://www.zen-cart.com/forum/showthread.php?t=58629]
[3] CSS Horinzontal Dropdown Menu with JQuery [http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=1874]

Thanks in advance for any assistance.

Phil

17 Sep 2011, 3:09 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: mod on CSS Horizontal Dropdown

You can address the menus on the right with increasing amounts of negative left positioning, like this:```
#dropMenu>ul>li+li+li+li+li+li>ul {
left: -4em !important;
}
#dropMenu>ul>li+li+li+li+li+li+li>ul {
left: -12em !important;
}
#dropMenu>ul>li+li+li+li+li+li+li+li>ul {
left: -20em !important;
}
#dropMenu>ul>li+li+li+li+li+li+li+li+li>ul {
left: -1.9em !important;
}

The last ones need a small offset because they have only one column of items.
17 Sep 2011, 11:17 PM
#3
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: mod on CSS Horizontal Dropdown

I certainly wouldn't have ever come up with that. Thank you!

16 Oct 2011, 10:36 PM
#4
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: mod on CSS Horizontal Dropdown

I added a top-level category and removed 'Contact Us'. I'm assuming I need to change the above but can't for the life of me make sense of how this works...Help!?

16 Oct 2011, 10:58 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: mod on CSS Horizontal Dropdown

You have essentially one additional tab to care for. Take the last rule from above#dropMenu>ul>li+li+li+li+li+li+li+li+li>ul { left: -1.9em !important; }and modify it and add another one:```
#dropMenu>ul>li+li+li+li+li+li+li+li+li>ul {
left: -28em !important;
}
#dropMenu>ul>li+li+li+li+li+li+li+li+li+li>ul {
left: -1.9em !important;
}

17 Oct 2011, 12:01 AM
#6
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: mod on CSS Horizontal Dropdown

I still don't understand...But it works!

Thank you so much.

17 Oct 2011, 12:44 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: mod on CSS Horizontal Dropdown

#dropMenu>ul>li+li+li+li+li+li+li+li+li>ul { means a sublist in a ninth consecutive li.

#dropMenu>ul>li+li+li+li+li+li+li+li+li+li>ul {means a sublist in a tenth consecutive li.

19 Oct 2011, 12:59 PM
#8
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: mod on CSS Horizontal Dropdown

Okay. That helps.

Thanks!