Skip to main content
Inspiring
Jun 23, 2022 4:02 PM UTC
Answered

Problems with editing bootstrap navbar

I am trying to make one of the categories a dropdown. The navbar already includes one dropdown. I understand the code enough to copy and paste the code, but I am getting an error message. Apparently the coding only wants me to have one menu item as a dropdown. My site is large enough that I need more than one. Please advise if this can be done.

 

 

    This topic is closed to new replies. Start a new post to keep the conversation going.
    default0vaokg78cv42Correct answer
    Inspiring
    Jun 23, 2022 4:13 PM UTC

    I changed the label in the html code from navbarDropdown1 to navbarDropdown2, for the second drop down item I created. That eliminated any html errors and looks good, so far. 

    3 replies

    default0vaokg78cv42AuthorCorrect answer
    Inspiring
    Jun 23, 2022 4:13 PM UTC

    I changed the label in the html code from navbarDropdown1 to navbarDropdown2, for the second drop down item I created. That eliminated any html errors and looks good, so far. 

    Translate
    Nancy OShea
    Community Expert
    Community Expert
    Jun 23, 2022 5:48 PM UTC

    That's right.  Unlike re-usable classes which can be used many times, IDs are unique identifiers which cannot be duplicated on the same document. 

    Glad you got it sorted. 🙂

     

     

    Translate
    Nancy O'Shea— Product User & Community Expert
    Inspiring
    Jun 23, 2022 6:08 PM UTC

    I'm also trying to learn CSS grid and flexbox. Not easy!

    Translate