/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] one CSS dropdown menu with two lists side by side?

I would like the dropdown menu on this page – [url]http://iphonebuy-host1.gaiahost.net/index.html[/url] – to be structured so that there are two lists side by side, with CDMA being the heading for one list and AT&T GSM being the heading for the other list. The thing is I want to have that box-shadow around both lists together – if I just turn them into two separate lists in my HTML, currently the CSS will put a box-shadow around each list separately.

Can I make them display in the same container as two lists side by side? I know I’ve seen it on other sites (wish I could find an example right now) but don’t know if they used CSS or jQuery/JS.

[code=html]<ul class=”topnav”>
<li><a href=”index.html” class=”vertical-line”>Home</a></li>
<li><a href=”#” class=”vertical-line”>Get Quote</a>
<ul>
<li><span>Choose your phone</span></li>
<li>CDMA</li>
<li><a href=”cdma3gs8gb”>3GS 8GB</a></li>
<li><a href=”cdma3gs16gb”>3GS 16GB</a></li>
<li><a href=”cdma4-8gb”>4 8GB</a></li>
<li><a href=”cdma4-16gb”>4 16GB</a></li>
<li><a href=”cdma4s16gb”>4S 16GB</a></li>
<li><a href=”cdma4s32gb”>4S 32GB</a></li>
<li>AT&amp;T GSM</li>
<li><a href=”att3gs8gb”>3GS 8GB</a></li>
<li><a href=”att3gs16gb”>3GS 16GB</a></li>
<li><a href=”att4-8gb”>4 8GB</a></li>
<li><a href=”att4-16gb”>4 16GB</a></li>
<li><a href=”att4s16gb”>4S 16GB</a></li>
<li><a href=”att4s32gb”>4S 32GB</a></li>
</ul>
</li>
<li><a href=”about.html”>About</a></li>
</ul>[/code]

[CODE]/** top navigation menu **/
.topnav {
list-style:none;
background-color:#FFF;
font:1.313em arial, sans-serif;
color:#0071BC;
margin:-1.8em 0 1.2em 25em;
text-align:center;
}

.topnav li {
position:relative;
display:inline;
padding:0 .5em 0 .5em;
}

.topnav a {
display:inline-block;
}

/** for drop-down menu **/
.topnav ul {
background:#fff;
list-style:none;
position:absolute;
font:.9em arial, sans-serif;
padding:.5em 0;
left:-9999px;
border-radius:.5em;
-moz-box-shadow: 0 3px 2px 1px #ccc;
-webkit-box-shadow: 0 3px 2px 1px #ccc;
box-shadow: 0 3px 2px 1px #ccc;
}

.topnav ul li {
float:none;
color:#95DF00;
}

.topnav ul li span {
text-decoration:underline;
white-space:nowrap;
}

.topnav ul a {
white-space:nowrap;
padding-top:.5em;
}

.topnav li:hover ul {
left:0;
}

.topnav li:hover a {
color:#99CCCC;
}

.topnav li:hover ul a {
color:#0071BC;
}

.topnav li:hover ul a:hover {
color:#99CCCC;
}[/CODE]

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@spacebettyauthorMay 09.2013 — YES! Thank you, that is exactly what I needed ?
×

Success!

Help @spacebetty spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...