Clean theme - dropdown menu for subpages

Post Reply
grimblefritz
Posts: 16
Joined: Tue Apr 25, 2023 1:21 pm

Clean theme - dropdown menu for subpages

Post by grimblefritz »

I'm not much good with CSS and JS stuff. I usually recognize with a thing is possible. I just don't know how to go about doing it.

Has anyone implemented, or can someone help me how to implement, dropdown menus for subpages in the Clean theme?
User avatar
mjxl
Posts: 43
Joined: Thu Jan 30, 2020 4:57 am

Re: Clean theme - dropdown menu for subpages

Post by mjxl »

I used W3 schools for getting into some HTML/CSS.
Here's a page for dropdown stuff: https://www.w3schools.com/css/css_dropdowns.asp

Our navigation items look like this:

Code: Select all

<li class="nav-item active">
  <a class="nav-link" href="...">Home</a>
</li>
So our dropdown "content" would be the selector "nav-item".
As for the container, we have this code:

Code: Select all

<div class="collapse navbar-collapse" id="navMobile">
  <ul class="nav navbar-nav">
    <?= $Wcms->menu() ?>
  </ul>
</div><!--/.nav-collapse -->
So then the selector the items originate from, can be either the div (.collapse/.navbar-collapse/#navMobile)

If that is not correct, we could use the ul. (ul.nav or ul.navbar-nav)

Hope this helps !
grimblefritz
Posts: 16
Joined: Tue Apr 25, 2023 1:21 pm

[SOLVED] Clean theme - dropdown menu for subpages

Post by grimblefritz »

I have worked out a pretty good dropdown menu system. If there weren't mobile devices, it would have been easy :)

I will post a link to a site that's using it, just as soon as I get permission from them. If they nix using their site, I'll make a demo site.
Post Reply