I have a website that is made with Twitter Bootstrap. On a large screen the navbar is looking nice as it should be but if you see the same navbar on a cellphone the navbar won\'
id
. If it already has one, take note of it. Your parent div is going to be the one whose immediate children comprise the dropdown [the links, buttons, etc.]data-toggle
and data-target
to each of the child elements of our previously talked-about parent div.id="my_parent_div"
, the child elements should each have data-toggle="collapse" data-target="#my_parent_div"
appended inside the link attribute.Here's a sample from my fixed navbar code:
Hope this helps :)