Home › Forums › JavaScript › Need some help with a jQuery Dropdown
- This topic is empty.
-
AuthorPosts
-
January 27, 2010 at 8:22 pm #27763RoseyMember
Okay, I used Chris’s jQuery dropdown freebie, but can’t seem to get everything to line up. Everything gets thrown in random directions, and all have different sizes. What am I doing wrong? I’m pretty new to jQuery, btw, so bare with me.
HTML Code:
Code:
- Craig Northacker
- Ira Epstein
- Annie Predun
- Richard Prince
- Jim Hartnett
- Dr. David O. Carpenter
- Gregg Luckman
- Charles Eggleston
- Advisors
- Medical Advisory Board
- David Carpenter, MD
- Mohamed Abou-Donia, PhD
- Paulette McCormick, PhD
- Donald Stein, PhD
- Rita Spilken, PhD
- Programs
- Entrepreneurship’s
- Education & Vocational Training
- Employment
- Resources & Links
- News & Events
- Publications
CSS Code
Code:body { font: 14px Georgia, serif; background: #28748c url(../images/bg.jpg) repeat-x; }#page-wrap { width: 800px; margin: 10px auto; }
#main-content { background: rgba(255,255,255,1.0); padding: 20px; width: 760px; -moz-border-radius: 20px; -webkit-border-radius: 20px; border-radius: 20px; }
#logo { margin: 0 auto; text-align: center; }
a { text-decoration: none; }
ul { list-style: none; }
p { margin: 15px 0; }/*
LEVEL ONE
*/
ul.dropdown { position: relative; }
ul.dropdown li { font-weight: bold; float: left; zoom: 1; background: #ccc; }
ul.dropdown a:hover { color: #000; }
ul.dropdown a:active { color: #ffa500; }
ul.dropdown li a { display: block; padding: 4px 8px; border-right: 1px solid #333;
color: #222; }
ul.dropdown li:last-child a { border-right: none; } /* Doesn’t work in IE */
ul.dropdown li.hover,
ul.dropdown li:hover { background: #F3D673; color: black; position: relative; }
ul.dropdown li.hover a { color: black; }/*
LEVEL TWO
*/
ul.dropdown ul { width: 220px; visibility: hidden; position: absolute; top: 100%; left: 0; }
ul.dropdown ul li { font-weight: normal; background: #f6f6f6; color: #000;
border-bottom: 1px solid #ccc; float: none; }/* IE 6 & 7 Needs Inline Block */
ul.dropdown ul li a { border-right: none; width: 100%; display: inline-block; }/*
LEVEL THREE
*/
ul.dropdown ul ul { left: 100%; top: 0; }
ul.dropdown li:hover > ul { visibility: visible; } -
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.