Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using dropdown in main menu nav shows caret (i.e. expanded on), but doesn't react on click. This was fixed by deleting "dropdown" dependency in subtheme yml (found in a forum).
Clicking submenu caret brings up submenu now, but behind page title (see attached screen part); looks like CSS styling issue.
Comment | File | Size | Author |
---|---|---|---|
#6 | Drupal 8 Bootstrap Opacity Issue Styles.png | 19.21 KB | janes_p |
#6 | Drupal 8 Bootstrap Opacity Issue Screen.png | 47.57 KB | janes_p |
Drupal 8 Bootstrap Submenu.png | 277.97 KB | janes_p |
Comments
Comment #2
Webeez CreditAttribution: Webeez commentedz-index?
Comment #3
markhalliwellClosing per http://drupal-bootstrap.org/api/bootstrap/docs%21Contributing.md/group/c...
Reason: site specific, css/layout
Comment #4
janes_p CreditAttribution: janes_p commentedAs there is almost no proprietary styling, this looks like a CSS issue in the bootstrap theme/subtheme framework to me; I will do some more research and report findings here (however I am not so much a CSS person)
Comment #5
janes_p CreditAttribution: janes_p commentedI tried a plain Bootstrap subtheme and dropdown menus are working fine with it. Looks like I already made too many changes in Twig page template and CSS. Apologies for bothering...
Comment #6
janes_p CreditAttribution: janes_p commentedThe issue is caused by an opacity styling (which I am using to let a background picture shine through): Even with a Bootstrap subtheme in its plainest form, as soon as I assign background opacity styling to the .navbar class, the dropdown menu slips underneath the page title (see attached screens for effect and styling). I think this justifies a reopen request.
BTW: I couldn't z-index get to work
Comment #7
janes_p CreditAttribution: janes_p commentedCan you please re-assess, based on most recent findings? Thanks
Comment #8
markhalliwellNo it doesn't. This project is not responsible for CSS customization, teaching how CSS works or any browser limitations around CSS.
Comment #9
markhalliwellFWIW, a quick search turned up: http://stackoverflow.com/a/11742116/1226717
Simply put: you're trying to style the wrong element.
Comment #10
janes_p CreditAttribution: janes_p commentedI found a solution: Working with rgba instead of color and opacity doesn't create the undesired effects (styling the same element)
Comment #11
learnbydrop CreditAttribution: learnbydrop commentedAdd this custom JS in the theme js file, it will resolve the issue.
Review the code implemented in http://www.stayinpg.in
jQuery('.dropdown-toggle').mouseover(
function() {
jQuery('.dropdown-menu' ).css( "display","block" );
}
);
jQuery('.dropdown-menu').mouseover(
function() {
jQuery('.dropdown-menu' ).css( "display","block" );
}
);
jQuery('.dropdown-toggle').mouseout(
function() {
jQuery('.dropdown-menu' ).css( "display","none" );
}
);