Jump to content

Search the Community

Showing results for tags 'drop down'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 4 results

  1. Hi all, I'd like to make a responsive navigation bar with a drop down menu using jQuery but I'm having some difficulties getting it work properly. I've just started learning jQuery so my knowledges in this language are very limited for the moment. I know there is a tutorial precisely for that on w3school but I followed this tutorial on YouTube as the result is closer to what I would like to end up with. Besides, the code looks easier to me. What I'm trying to do is basically the same thing but without using an external <div> for the menu bar, which I would like to include in the list elements. To do so, I hid all the list elements using a max-height to 0 except for the "menu" one, then I toggleClassed all the list elements but the "menu" one so they get the new declaration max-height= 3em. Unfortunately, the menu doesn't drop down when clicking on the "menu" bar. Any help? Thanks. Here is the .html <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="responsiveMenu2.css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <title>Test</title> </head> <body> <header> <h2>responsive navigation (mobile first)</h2> <nav> <ul> <li class="menu" id="menu"><a href="#">menu</a></li> <li class=""><a href="#">home</a></li> <li class=""><a href="#">galleries</a></li> <li class=""><a href="#">news</a></li> <li class=""><a href="#">about</a></li> <li class=""><a href="#">contact</a></li> </ul> </nav> </header> <section> <article> Sed maximum est in amicitia parem esse inferiori. Saepe enim excellentiae quaedam sunt, qualis erat Scipionis in nostro, ut ita dicam, grege. Numquam se ille Philo, numquam Rupilio, numquam Mummio anteposuit, numquam inferioris ordinis amicis, Q. vero Maximum fratrem, egregium virum omnino, sibi nequaquam parem, quod is anteibat aetate, tamquam superiorem colebat suosque omnes per se posse esse ampliores volebat. Inter haec Orfitus praefecti potestate regebat urbem aeternam ultra modum delatae dignitatis sese efferens insolenter, vir quidem prudens et forensium negotiorum oppido gnarus, sed splendore liberalium doctrinarum minus quam nobilem decuerat institutus, quo administrante seditiones sunt concitatae graves ob inopiam vini: huius avidis usibus vulgus intentum ad motus asperos excitatur et crebros. Apud has gentes, quarum exordiens initium ab Assyriis ad Nili cataractas porrigitur et confinia Blemmyarum, omnes pari sorte sunt bellatores seminudi coloratis sagulis pube tenus amicti, equorum adiumento pernicium graciliumque camelorum per diversa se raptantes, in tranquillis vel turbidis rebus: nec eorum quisquam aliquando stivam adprehendit vel arborem colit aut arva subigendo quaeritat victum, sed errant semper per spatia longe lateque distenta sine lare sine sedibus fixis aut legibus: nec idem perferunt diutius caelum aut tractus unius soli illis umquam placet. </article> </section> <script> $(".menu").on("click", function(){ $("nav ul li").not(".menu").toggleClass("showing"); }); </script> </body> </html> And the .css *{ box-sizing: border-box; } html{ width: 100%; min-height: 100%; } body{ height: 100%; margin: 0; padding: 0; text-align: center; } header{ background-color: #00795f; width: 100%; padding: 40px 0 0 0; color: white; text-transform: capitalize; } nav{ margin-top: 40px; width: 100%; background-color: #43a286; text-transform: capitalize; } nav ul{ list-style-type: none; padding: 0; margin: 0; } nav ul li:not(#menu){ max-height: 0; -webkit-transition: max-height 0.4s; -moz-transition: max-height 0.4s; -ms-transition: max-height 0.4s; -o-transition: max-height 0.4s; transition: max-height 0.4s; } nav ul li a{ display: block; width: 100%; line-height: 3em; text-decoration: none; color: white; } nav ul li a:hover{ background-color: #399077; } section{ line-height: 1.5em; font-size: 0.9em; padding: 0; width: 100%; } article{ text-align: justify; padding: 5% 4%; } #menu{ background-color: #005c48; cursor: pointer; } .showing{ height: 3em; } @media screen and (min-width: 680px){ #menu{ display: none; } nav{ height: 3em; } nav ul li{ display: inline-block; margin: 0 1%; } nav ul li a{ padding: 0 20px; line-height: 3em; } section{ max-width: 900px; margin: 0 auto; } }
  2. Hi All, This is my first post! I think this site is amazing. I love the little try it yourself windows. SO cool. So my question is this: how can I make a form that has two drop down menus (the first with 2 options and the second with 3) and a submit button which upon clicking will take the user to one of 6 html pages on my website. Drop down 1: -Fairy Goddess -Inner Warrior Drop down 2: -Young Adult -20 Something -30 and up Possible outcomes: 1. Fairy Goddess - Young Adult 2. Fairy Goddess - 20 Something 3. Fairy Goddess - 30 and up 4. Inner Warrior - Young Adult 5. Inner Warrior - 20 Something 6. Inner Warrior - 30 and up I've tried to get a start by modifying this check-box & submit disclaimer code that I successfully implemented on one page. I haven't an idea how to modify the JS to match what I want to do with the HTML. Please correct and direct me to solve this! The code I have now: <SCRIPT language=JavaScript><!--//Accept terms & conditions script (by InsightEye www.insighteye.com)//Visit JavaScript Kit (http://javascriptkit.com) for this script & more.function checkCheckBox(f){if (f.agree.checked == false ){alert('Please agree to the terms by checking the box to continue.');return false;}else{return true;}}//--> </SCRIPT> followed by: <!-- Consultation form code --> <form action="fairy-goddess.html" autocomplete="on"> Choose your Guide <input list="guides" name="guide"> <datalist id="guides"> <option value="Fairy Goddess"> <option value="Inner Warrior"> </datalist><br> Choose your age group <input list="age-groups" name="age-group"> <datalist id="age-groups"> <option value="Young Adult"> <option value="20 Something"> <option value="30 & up"> </datalist><br> <input type="button" class="btn btn-default" value="Submit" onclick="document.location.href='../disclaimer.html';"></form><!-- Consultation form code --> THANKS!!
  3. Hello all. I'm relatively new to CSS, so please be gentle with me. I have a question about a vertical drop down menu I'm working on. It's looking decent so far. You can see it here, under my photo. But, as you can see in the photo, I'm hovering over "the little victorian." Obviously, I'd rather have the other categories move down while I'm hovering instead of being covered up. Make sense? I'm sure there are proper terms that I'm not using. I am also sure there is more information you need from me before anyone can answer. Just let me know what it is and I'll provide it! Thank you,Christina
  4. Hi all, I am currently brushing up on some skills, and I've run into an issue. I'm working with a double line van menu, and I want to include drop downs throughout the menue. The drop downs are ok for the bottom line, but the top line is having some issues. I've attached the file I'm working with. Bonus to anyone who can help me get the css styling the first level of the nav to stop affecting the second level. Thanks,Rebecca index2.html
×
×
  • Create New...