The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Overlay Menu help required. (Creating Submenus)
Midwinter
post Jan 28 2023, 10:10 AM
Post #1


Newbie
*

Group: Members
Posts: 10
Joined: 28-January 23
Member No.: 28,774



Hi there.

New user, so thank you in advance for any assistance that you may be able to give me.

I am in the process of creating a website. I've used (copy/pasted) some code for an overlay menu - which works perfectly. However, I would like to add a submenu to some of the categories. I've checked on the W3C site and performed a loose search on how to do this, but I'm unable to find any hints/tips that tell you how to add submenus to an overlay - only a normal navigation menu.

The site is theadventurers.agency

and here's the code before I customised it.

...THE HTML...
CODE

<!-- Menu Overlay -->
<div id="taaNav" class="overlay">

    <!-- Close Button -->
    <a href="java script:void(0)" class="closebtn" onclick="closeNav() "><u>Close Menu</u></a>

    <!-- Overlay Menu Content -->
    <div class="overlay-content">
        <a href="index.html" class="glass">Home</a>
        <a href="https://theadventurers.agency/content/biographies/biographies.html" class="glass">Biographies</a>
        <a href="https://theadventurers.agency/content/reference/reference.html" class="glass" target="_blank">Reference Section</a>
        <a href="#" class="glass" target="_blank">The Journals</a>
        <a href="#" class="glass">Submissions</a>
        <a href="#" class="glass" target="_blank">The Midwinter Mapworks</a>
        <a href="#" class="glass" target="_blank">Forums</a>
        <a href="https://theadventurers.agency/shop/index.php" class="glass" target="_blank">Merchandising</a>
        <a href="https://theadventurers.agency/content/faqs/faqs.html" class="glass">FAQ's</a>
        <a href="#" class="glass">Subscribe & Donate</a>
        <a href="#" class="glass" target="_blank">Artist Galleries & Links</a>
        <a href="#" class="glass">Get In Touch</a>
    </div>

</div>

<!-- The Menu Button -->
<span onclick="openNav() "><h1><u>MENU</u></h1></span>
<br>

...AND THE CSS...
CODE

/* OVERLAY MENU STYLING */
/* -------------------- */

/* The Overlay */
.overlay {
    /* Overlay Height */
    height: 0%;
    /* Overlay Width */
    width: 100%;
    /* Overlay Position */
    position: fixed;
    /* Z Index Keeps Overlay On Top */
    z-index: 1;
    top: 0;
    left: 0;
    /* Overlay Fallback Color */
    background-color: rgb(0,0,0);
    /* Overlay Color With Transparency/Opacity */
    background-color: rgba(0,0,0, 0.9);
    /* Disables Horizontal Scroll (Original Hidden - Changed To Auto)*/
    overflow-y: auto;
    /* Transition Effect Delay */
    transition: 0.5s;
}
/* Overlay Content Positioning */
.overlay-content {
    position: relative;
    /* Position Content 25% From The Top Of The Screen */
    top: 25%;
    /* Menu Width 100% */
    width: 100%;
    /* Center The Text */
    text-align: center;
    /* Add A 30px Top Margin To Avoid Conflict With The Close
    Button On Smaller Screens */
    margin-top: 30px;
}
/* Overlay Navigation Links */
.overlay a {
    padding: 8px;
    text-decoration: none;
    font-size: 36px;
    color: cyan;
    /* Display Block Instead Of Inline */
    display: block;
    /* Transition Effect On Hover */
    transition: 0.3s;
}
/* Overlay Color Change On Hover */
.overlay a:hover, .overlay a:focus {
    color:purple
}
/* Position Close Button In Top Right Corner */
.overlay .closebtn {
    position: absolute;
    top: 20px;
    right: 45px;
    font-size: 30px;
}
/* When The Height Of The Screen Is Less Than 450px,
Change The Font Size Of The Links And Reposition The Close Button
So That They Don't Overlap */
@media screen and (max-height: 450px) {
    .overlay {overflow-y: auto;}
    .overlay a {font-size: 20px}
    .overlay .closebtn {
    font-size: 40px;
    top: 15px;
    right: 35px;
    }
}

        ul {
            list-style-type: none;
            margin: 0;
            padding: 0;
        }

        li a {
            display: block;
            width: 200px;
            background-color: #3a3b3c;
            text-align: center;
        }

/* BUTTON STYLING */
/* -------------- */

        .glass{
    position: relative;
    display: inline-block;
    padding: 15px 25px;
    background-color: black;
    background-image: linear-gradient(#3a3b3c,black);

    text-decoration: none;
    color: cyan;
    font-size: 25px;
    font-family: "Fondamento-Regular", 'Times New Roman', Times, serif;
    font-weight: 100;
    border-radius: 3px;
    box-shadow: 0px 1px 4px -2px #333;
    text-shadow: 0px -1px #333;
}

.glass:after{
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(100% - 4px);
    height: 50%;
    background: linear-gradient(rgba(255,255,255,0.8)), (rgba(255,255,255,0.2));
}

.glass:hover{
    background: linear-gradient(rgb(74, 80, 167),rgb(44, 3, 110));
}
/* Horizontal Line With Rounded Border */
.rounded {
    border-top: 5px solid #d4af37;
    border-radius: 5px;
}

My knowledge of html and css was once "quite" good, but as with everything, without constant practice, one's memory wavers, so I've forgotten most of what I've ever learned, so please bear this in mind when assisting.

Once again, thank you in advance.

Best Wishes,

Chris.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Midwinter
post Feb 17 2023, 03:49 PM
Post #2


Newbie
*

Group: Members
Posts: 10
Joined: 28-January 23
Member No.: 28,774



Jason - in the htaccess file, line 31, do I need to uncomment lines 32 to 36 or just the one regarding https if I have forced ssl on the website?

Not sure if this part is relevant but I don't have www at the beginning of the URL.

Finally, once I've made my changes, if I repack the file and include a text file that lists all the changes that I've made, would you have time to take a quick look, just to make sure that I've done it correcly, please?

By the way...

What's the separator that you've used for the file names, please? My screen's too small for me to see - but it looks like a small square?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic
Midwinter   Overlay Menu help required. (Creating Submenus)   Jan 28 2023, 10:10 AM
Christian J   Hi! I would like to add a submenu to some of...   Jan 28 2023, 12:34 PM
pandy   Yes, probably. I think it would be possible to rew...   Jan 28 2023, 02:25 PM
Jason Knight   Hmm. Never heard them called "overlays" ...   Jan 28 2023, 04:12 PM
Christian J   https://developer.mozilla.org/en-US/docs/We...Ele...   Jan 29 2023, 07:24 AM
Jason Knight   And here we go. Live demo of a rewrite here: http...   Jan 28 2023, 04:37 PM
Jason Knight   Of course, waiting on her to be ready, so I added ...   Jan 28 2023, 05:09 PM
Midwinter   I cant' thank you all enough for your response...   Jan 29 2023, 06:14 AM
Jason Knight   I think we can continue here. Keep it together and...   Jan 29 2023, 11:35 AM
Jason Knight   Laugh is this took me longer to document than it d...   Jan 29 2023, 11:41 AM
Jason Knight   Oh, and before we get into the CSS I want to talk ...   Jan 29 2023, 12:17 PM
Jason Knight   Oh, before I get into the CSS I also want to expla...   Jan 29 2023, 12:27 PM
Midwinter   Thank you again for the work that you've put i...   Jan 30 2023, 10:21 AM
Jason Knight   When I first saw the explanations above, I have t...   Jan 31 2023, 05:19 PM
Christian J   Does it matter how many are in there? I mean, is ...   Jan 31 2023, 07:26 PM
Midwinter   My apologies. Perhaps I should have mentioned the ...   Feb 4 2023, 02:43 PM
Midwinter   Just an update... Having now spent a good few hou...   Feb 9 2023, 03:26 PM
Christian J   Perhaps some kind of Blog script could be used? Ot...   Feb 9 2023, 07:33 PM
Midwinter   Hi Christian. Thank you for the response. A blog...   Feb 10 2023, 08:15 AM
Jason Knight   Do you have any suggestions into where I might fi...   Feb 11 2023, 01:30 AM
Christian J   It very simple, just add something like: <?p...   Feb 10 2023, 08:40 PM
pandy   (You can also make PHP run in files with "....   Feb 10 2023, 11:01 PM
Christian J   (You can also make PHP run in files with ...   Feb 11 2023, 07:37 AM
Midwinter   Hi all. Christian - thank you for the above - I...   Feb 11 2023, 09:05 AM
Midwinter   Jason - in the htaccess file, line 31, do I need t...   Feb 17 2023, 03:49 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 05:45 AM