Drop Down Menu on Homepage

Ok. thanks for the feedback.

I’m going to spend some time with the home page and the horizontal menus now. I believe you were seeking a little fluid action before switching to the slim menus. At this moment, the horizontal menu layout seems to need a bit of work. I want to tinker a bit and see how it plays out.

The slim menu with graphics is relatively simple. The horizontal menu, with its different graphics and all of its sub-menus, is complex. I believe that the best game plan is to code both menus on the page independently and set the unused menu to {display:none}. I can’t see a sensible way to transition from the horizontal menu with dropdowns to the slim menu layout otherwise.

Yeah, I guess showing one menu at a time is the optimal way to display the menu. How should the graphics change for two menus? Can they stay the same?

Hey, dude, you drew the pictures!!! The graphics are entirely different. I’m trying to set up a “proof of concept” for you to test. So far, it shows the horizontal menus but no dropdowns. Hopefully, that will be enough to help you decide if your design looks and works as well as you expect it to. Give me another day or so to set that up. I’ll post the code and images in your dropbox.

OK, Ty, I’ve kept you waiting for quite a while. Thank you for your patience. Let me know if this draft comes close to fulfilling your wishes.

FYI: Depending on your browser settings, you may feel like the buttons in the horizontal menu have too much space between them and they don’t compress enough before switching to the slim menu. Trust me that the wide menu is fluid and its compression is limited by the width of the text in the buttons. That said, remember that you have no control over the font-size in the user’s browser. In my PC, for example, the bottom wide menu can’t become much narrower without overflowing the row. (I use Firefox and Verdana 16px as my default settings). Using Chrome at its default settings, the wide menus look “spaced out”. I suggest not narrowing that transition setting.

I tried to tinker with the design of the dropdown menus, but your menu items are not consistently laid out. Since this wasn’t on your “todo” list (and I was just playing), I left it in an “inconsistent” state. You’ll have to restyle the menus to your liking.

There are a few notes at the top of the home page.

The folder is named WorldReviewGroup4

Hope you find it useful.

Thank you, Ronpat! You didn’t keep me waiting at all… :sunny: I was about to put a little question out about the other thread for the logistics site.

I’ll be back to write more once I study what you have completed.

1 Like

Well, this new menu is awesome! I’m learning so much. I have a lot of questions about some things, though. I’ve gone ahead and re-styled and tweaked a lot of everything, though your idea for the color scheme on the wide menus I really liked.

Check out the new test page

When you’re on the links on the slim menu, go ahead and click/drag and tab the items. I tried to implement the same thing on the child links in the wide menu, but the links just stay red without the background color change (try clicking, dragging, and tabbing through those links).

Also, I noticed that the “general” tab is extremely long on my roommate’s laptop, and I want to divide it in to two columns. You’ll see that I’ve made a feeble attempt with two divs, one with a class #menucolleft, and the other- #menucolright. So, I broke that part on purpose to work on it.

I’ll want to change the visited state for the links to a different kind of gradient (maybe like a velvet) as well as some others.

Also, the bottom “business” menu main list items do not hold their hover state when the child list is displayed.

Hello all,

I am making a header image that will change to a slimmer image splice with a media query when the viewport is slimmer. My test page is located here. The graphic I have designed is located here. You’ll see that I have simply made a containing div and a span that the height can change, but I don’t know exactly how to proceed to achieve the splice effect, while also maintaining image with fluid sizes…

.head .headerlogo {
background:url("WRGImg.png") no-repeat scroll;
min-height:58px;
max-height:135px;
}

This is the only bit of styles I have done. It starts on line 52.

Thanks all for your help!

-tyler :smiley:

Hi,

I’m not quite sure what look you are going for but this should get you started.

h1{height:auto}
.head .headerlogo {
    height:152px;
    max-height:none;
    min-height:0;
    background:url(http://www.worldreviewgroup.com/hp-test/style/WRGImg.png) no-repeat 50% 0;
}
.head img {
    max-width:600px;
    width:100%;
    height:auto;
    margin:auto;
}
 @media screen and (max-width:650px) {
    .head .headerlogo {
        background:none;
        height:280px;
    }
    .head .headerlogo span {
        display:block;
        margin:5px auto;
        width:320px;
        height:280px;
        background:url(http://www.worldreviewgroup.com/hp-test/style/WRGImg.png) no-repeat 0 -152px;
    }
}

I would have just scaled the image rather than change it but teh above should get you on the right track.

Hi Paul, and thanks for your help.

That looks pretty nice on my screen, but I would like to keep the plain black text h1 element hidden away in a lower z-index somehow. Maybe I can figure that out on my own and post the solution.

I would like to make the thinner version scale (if possible) as the page gets more narrow.

-tyler

If you mean you want to hide the text at smaler widths then just set it to display:none in the media query I gave you. Or reduce the font-size in the media query a little so that it fits on one line at smaller widths.

You would need to use separate images to do this rather than a sprite. Then it would be better to use the image in the html and set its width to 100% and its height to auto (as i did with your star images).

etidd, The code for most of this was already in the CSS and HTML that I sent. Changing the image on the page when the menu is slim requires modifications to the initial CSS on the slim menu CSS, not changing it on the primary CSS. The latter screws up the widemenu layout. I recommend that you restore the original look for the wide menu then lets discuss the look of the head and banner image for the slim menu view.

I recommend adding this topic to the previous one.
http://www.sitepoint.com/community/t/drop-down-menu-on-homepage/106576

Oops. What in particular would be causing an overlap in the styles of the wide menu?

Well, I already went ahead and made new images for this header. wide one, slim one

Threads merged as requested;)

I’m sorry to backstep, but let’s please fix the <h1> tag and the banner image…

The <h1> tag serves three useful purposes on your page.

  1. Google recognizes it as the keynote of your site.
  2. Users using screen readers can hear it.
  3. Should the banner image go missing, or if a user is browsing with images turned off, it will be visible.

I put that tag at the top of the page and hid it beneath the banner by applying a negative margin-top to the box containing the images. This allows the banner to remain fluid and scale as needed to fit the page. The size of the <h1> text was small enough so it remained hidden in the narrowest view (unless the user’s default font-size were significantly increased).

You have increased the size of the <h1> tag to 3em and deleted the negative margin so it is visible above the banner. It looks rather tacky over that diagonally striped background and pushes the banner down. Your changes affect both the wide and slim menu views.

I’m reverting back now, and I will also have to get started on transferring the styles to the old way the wide menu was set up.

Which old way? The way with all of the IDs, or the way I had it set up in the draft? I can help you modify the classed styles in the draft, if you would like. I was hoping you might be able to arrange the dropdowns so they used the same pattern of “title > header > links” or thereabouts. Doesn’t matter, I guess. I’m sure whatever you want can be coded.

Yes, that is what I was meaning to convey. The old styles need to be converted/re-written using the > operator and the new targets like you had set up for the new one. I will go ahead and upload the old bar graphics up to the site for this wide menu. I also have to work in the new color themes to the old design.

Cool. Whenever your ready.

Well… I broke it. :construction: :ant:
link

I bet I have a mismatching number of divs… haven’t validated. I changed the wide menu markup to this (so far):

<!-- BEGIN widemenus -->
            <div class="widemenus">
                <div class="widemenu personal">
                    <div class="menubox">
                        <ul class="menuitems">
                            <li><a href="health.html">health</a>
                                <div class="health">
                                    <h2>weight loss &amp; wellness</h2>
                                    <h3>fitness</h3>
                                    <ul>
                                        <li><a href="health/fitness/weiderpowerbell1.html">Weider PowerBell</a></li>
                                        <li><a href="health/fitness/brazilbuttlift1.html">Brazil Butt Lift</a></li>
                                        <li><a href="health/fitness/georgesstpierre1.html">MMA Training with Georges St. Pierre</a></li>
                                        <li><a href="health/fitness/turbofire1.html">TurboFire Fitness</a></li>
                                    </ul>
                                    <h3>dieting</h3>
                                    <ul>
                                        <li><a href="health/dieting/healthetrimdiet1.html">Health&eacute; Trim Diet</a></li>
                                        <li><a href="health/dieting/southbeach1.html">South Beach Diet</a></li>
                                    </ul>
                                    <h2>supplements</h2>
                                    <ul>
                                        <li><a href="health/Rx/nutrilitevitamins1.html">Nutrilite Multivitamins</a></li>
                                        <li><a href="health/Rx/dochangover1.html">Doc Hangover Cure</a></li>
                                        <li><a href="health/Rx/libigrow1.html">Libigrow</a></li>
                                        <li><a href="health/Rx/smokedeter1.html">Smoke Deter</a></li>
                                        <li><a href="health/Rx/prorexin1.html">Prorexin</a></li>
                                    </ul>
                                    <h2>skin care</h2>
                                    <ul>
                                        <li><a href="health/skincare/shivaacne1.html">Shiva23 Acne Cream</a></li>
                                        <li><a href="health/skincare/deadseamineral1.html">Dead Sea Mineral Cellulite Treatment</a></li>
                                    </ul>
                                </div>
                            </li>
                            <li><a href="insurance.html">insurance</a>
                                <div class="insurance">
                                    <a href="insurance/propertyinsurance1.html" class="sublink">home&frasl;property insurance</a>
                                    <ul>
                                        <li><a href="insurance/bestquoteshomereview1">BestQuotes</a></li>
                                        <li><a href="insurance/usinsuranceonlinehomereview1.html">USInsuranceOnline</a></li>
                                    </ul>
                                    <a href="insurance/autoinsurance1.html" class="sublink">auto insurance</a>
                                    <ul>
                                        <li><a href="insurance/bestquotesautoreview1.html">BestQuotes</a></li>
                                        <li><a href="insurance/atlascarinsurancereview1.html">Atlas Car Insurance</a></li>
                                        <li><a href="insurance/cheapcarinsurancetrick1.html">Cheap Car Insurance Trick</a></li>
                                        <li><a href="insurance/usinsuranceonlineautoreview1.html">U.S. Insurance Online</a></li>
                                    </ul>
                                    <a href="insurance/healthinsurance1.html" class="sublink">health insurance</a>
                                    <ul>
                                        <li><a href="insurance/betterhealthquotereview1.html">Better Health Quote</a></li>
                                        <li><a href="insurance/bestquoteshealthreview1.html">BestQuotes</a></li>
                                        <li><a href="insurance/2insure4lesshealthreview1.html">2Insure4Less</a></li>
                                    </ul>
                                    <a href="insurance/lifeinsurance1.html" class="sublink">life insurance</a>
                                    <ul>
                                        <li><a href="insurance/2insure4lesslifereview1.html">2Insure4Less</a></li>
                                        <li><a href="insurance/usinsuranceonlinelifereview1.html">USInsuranceOnline</a></li>
                                    </ul>
                                </div>
                            </li>
                            <li><a href="general.html">general</a>
                                <div class="general"> 
                                    <div class="menucolleft">
                                        <h2>electronics</h2>
                                        <h3><span>gaming</span></h3>
                                        <ul>
                                            <li><a href="gaming/haltgamereview1.html">Halt Game</a></li>
                                            <li><a href="gaming/battlestargalactica1.html">Battlestar Galactica</a></li>
                                            <li><a href="gaming/gsn1.html">GSN Gaming</a></li>
                                        </ul>
                                        <h3><span>electronic gadgets</span></h3>
                                        <ul>
                                            <li><a href="electronics/kindle1.html">Kindle e&ndash;Reader</a></li>
                                            <li><a href="electronics/ecig1.html">Electronic Cigarettes</a></li>
                                        </ul>
                                        <h2>style &amp; fashion</h2>
                                        <h3><span>makeup</span></h3>
                                        <ul>
                                            <li><a href="makeup/dinair1.html">Dinair Airbrush Makeup</a></li>                                            
                                            <li><a href="makeup/simplykaren1.html">Simply Karen</a></li>
                                        </ul>
                                        <h2>food&frasl;dining</h2>
                                        <h3><span>net grocers</span></h3>
                                        <ul>
                                            <li><a href="food/efooddepot1.html">eFood Depot</a></li>
                                            <li><a href="food/peapod1.html">Peapod</a></li>
                                        </ul>
                                    </div>
                                    <div class="menucolright">
                                        <h2>coupons</h2>
                                        <ul>
                                            <li><a href="coupons/brandcaster1.html">Brandcaster Coupons</a></li>
                                        </ul>
                                        <h2>cars&frasl;auto</h2>
                                        <ul>
                                            <li><a href="auto/carfax1.html">Carfax Vehicle History Reports</a></li>
                                            <li><a href="auto/carprices1.html">CarPrices.com</a></li>
                                        </ul>
                                        <h2>security</h2>
                                        <ul>
                                            <li><a href="security/adtalarm1.html">ADT Alarm System</a></li>
                                        </ul>
                                        <h2>hobby</h2>
                                        <h3><span>music</span></h3>
                                        <ul>
                                            <li><a href="music/guitartricksreview1.html">GuitarTricks</a></li>
                                            <li><a href="music/jamoramareview1.html">Jamorama&ndash; Learn Guitar</a></li>
                                        </ul>
                                    </div>
                                </div>
                            </li>
                            <li><a href="dating.html">dating</a>
                                <div class="dating">
                                    <h2>dating sites</h2>
                                    <ul>
                                        <li><a href="dating/30sdatingreviews1.html">30&apos;s Dating</a></li>
                                        <li><a href="dating/maturedatingreviews1.html">Mature Dating</a></li>
                                        <li><a href="dating/seniordatingreviews1.html">Senior Dating</a></li>
                                        <li><a href="dating/gaydatingreviews1.html">Gay &amp; Lesbian Dating</a></li>
                                        <li><a href="dating/germandatingreviews1.html">German Dating</a></li>
                                        <li><a href="dating/scandinaviandatingreviews1.html">Scandinavian Dating</a></li>
                                        <li><a href="dating/russiandatingreviews1.html">Russian Dating</a></li>
                                        <li><a href="dating/australiandatingreviews1.html">Australian Dating</a></li>
                                    </ul>
                                    <h2>books &amp; advice</h2>
                                    <ul>
                                        <li><a href="dating/askapril1.html">Ask April</a></li>
                                        <li><a href="dating/bounceback1.html">Bounce Back to Dating Formula</a></li>
                                        <li><a href="dating/datingsecrets1.html">Dating Secrets</a></li>
                                    </ul>
                                </div>
                            </li>
                            <li><a href="education.html">education</a>
                                <div class="education">
                                    <ul>
                                        <li><a href="education/scholzone1.html">Scholarship Zone</a></li>
                                        <li><a href="education/speedstudytechniques1.html">Speed Study Techniques</a></li>
                                        <li><a href="education/stimulusgrants1.html">Stimulus Grants    </a></li>
                                        <li><a href="education/teachmetoday1.html">Teach Me Today</a></li>
                                        <li><a href="education/winningsurveys1.html">Winning Surveys</a></li>
                                        <li><a href="education/basicskillsassessments1.html">Basic Skills Assessments</a></li>
                                    </ul>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div> <!-- widemenu personal -->
            <div class="widemenu bizness">
                <div class="menubox">
                    <ul class="menuitems">
                        <li><a href="bizopps.html">business opportunities</a>
                            <div class="bizopps">
                                <h2>home business scams</h2>
                                    <ul>
                                        <li><a href="bizopps/mobilemassmoney1.html">Mobile Mass Money</a></li>
                                        <li><a href="bizopps/autopilothomeprofits.html">Autopilot Home Profits</a></li>
                                        <li><a href="bizopps/anthonymorrison1.html">Anthony Morrison&apos;s Big Profits Secret</a></li>
                                    </ul>
                                    <h2>medical</h2>
                                    <ul>
                                        <li><a href="bizopps/medicalbillinghomebusiness1.html">The Medical Billing Home Business Bible</a></li>
                                    </ul>
                                    <h2>affiliate marketing</h2>
                                    <ul>
                                        <li><a href="bizopps/freesitesignup1.html">Cash&ndash;Pulling Affiliate Marketing Websites</a></li>
                                        <li><a href="bizopps/biggerbloggingprofitsreview1.html">Bigger Blogging Profits</a></li>
                                    </ul>
                                    <h2>trading&frasl;investing</h2>
                                    <ul>
                                        <li><a href="bizopps/milliondollarpips1.html">Pips Forex Trading Robot</a></li>
                                        <li><a href="bizopps/pennystockprophet1.html">The Penny Stock Prophet</a></li>
                                    </ul>
                                    <a href="bizopps/makemoneywithsurveys1.html" class="sublink">surveys</a>
                                    <ul>
                                        <li><a href="bizopps/swagbucks1.html">Swag Bucks</a></li>
                                        <li><a href="bizopps/corsentialsurvey1.html">Corsential</a></li>
                                    </ul>
                                    <ul>
                                        <li><a href="bizopps/thepeoplesprogram1.html">The People&apos;s Program</a></li>
                                    </ul>
                                </div>
                            </li>
                            <li><a href="bizservices.html">business services</a>
                                <div class="bizservs">
                                    <h2>shipping solutions</h2>
                                    <ul>
                                        <li><a href="bizopps/shipping1.html">Truckload&frasl;LTL Shipping</a></li>
                                    </ul>
                                    <h2>technology solutions</h2>
                                    <ul>
                                        <li><a href="telecommasterquoteagency1.html">Telecom Master Quote Agency</a></li>
                                    </ul>
                                    <h2>project management</h2>
                                    <ul>
                                        <li><a href="bizservices/projmgmttemplates1.html">Project Management Templates</a></li>
                                    </ul>
                                </div>
                            </li>
                            <li><a href="legal.html">legal services</a>
                                <div class="legalservs">
                                    <h2>will creation</h2>
                                    <ul>
                                        <li><a href="legal/willcreation1.html">Create My Will</a></li>
                                    </ul>
                                    <h2>defense attorney</h2>
                                    <ul>
                                        <li><a href="legal/DUIattorney1.html">DUI Attorney</a></li>
                                    </ul>
                                    <ul>
                                        <li><a href="debt/debtnegotiator1.html">Debt Negotiator</a></li>
                                    </ul>
                                    <a href="legal/creditdebt1.html" class="sublink2"><h3>credit debt</h3></a>
                                    <ul>
                                        <li><a href="debt/evalbankruptcy1.html">Bankruptcy Lawyer Finder</a></li>
                                        <li><a href="legal/bankruptcy1.html">Bankruptcy Attorney Finder</a></li>
                                    </ul>
                                    <a href="legal/bankruptcy1.html" class="sublink2"><h3>bankruptcy</h3></a>
                                    <h2>debt</h2>
                                    <ul>
                                        <li><a href="mortgage/foreclosurefighter1.html">Home Foreclosure Fighter</a></li>
                                        <li><a href="mortgage/fastcash4homes1.html">Fast Cash 4 Homes</a></li>
                                    </ul>
                                    <h2>mortgage</h2>
                                    <ul>
                                        <li><a href="debt/urgenthomerelief1.html">Urgent Home Relief</a></li>
                                    </ul>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div> <!-- widemenu bizness -->
            </div> <!-- .widemenus -->

The styles are changing a lot, but you can see it as I’m uploading what I’m doing.

It looks much better after I validated it and got it right. It just needs some minor things to get these wide menus right.