This zone is sleeping right now! ZzzZZzzz

Better not disturb it! ~You go to the petrol station and buy a slushy instead, everything is cool!~

This area will open again in 000.beats!

(Learn about Swatch Time)

Some other zones are awake :^]


Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
a Summer night - @99.32
Activity rating: Three Stars Posts & Arts: 30/1k.beats Random | Recent Posts | Guild Recents
News: :skull: Websites are like whispers in the night  :skull: Guild Events: Summer Projects

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  sub navs with buttons, is it possible?


« previous next »
Pages: [1] Print Embed
Author Topic: sub navs with buttons, is it possible?  (Read 187 times)
EdgyRabbid
Sr. Member ⚓︎
****
View Profile WWWArt


⛺︎ My Room
StatusCafe: edgyrabbid
iMood: EdgyRabbid

Guild Memberships:
Artifacts:
I met Dan Q on Melonland!Raymans Husband!SkeleraveJoined 2025!
« on: a Spring night » Embed

So right now, i am trying to make a sub nav. i felt like my website had too many sub navs be their own pages, and i wanted them to be more uniform, in a sense.

https://edgyrabbid.space/NormalHomePage.html

heres my home page. Yes it is messy right now, it is currently being renovated.

anyways, i was wondering if this https://www.w3schools.com/HOWTO/howto_css_subnav.asp would work with buttons?

Logged

https://i.ibb.co/Q7WhR6bG/0x0830-C1-D4-96-4.gif
http://internetometer.com/imagesmall/51063.png
i AM in LOVE WITh RaYMaN XxX
Play NETPETS today!
pepper
Sr. Member ⚓︎
****
View Profile WWWArt


🐾 local furry punk ⛥ she/her
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: mildlypepper
RSS: RSS

Guild Memberships:
Artifacts:
Joined 2025!SpiffoI met Dan Q on Melonland!pepperartemissodie
« Reply #1 on: a Spring night » Embed

That should work with buttons, I think you'd just have to put a button <img> element inside the <a> element instead of the text. I did something similar for my mobile header, I have a "hamburger" style button that when clicked opens the navbar buttons, which i have do a sound when clicked. (My code is a mess and def not optimized but here it is in case you're curious)

HTML:
Code
<header>
                <div id="header_box">
                    <img id="headerimg" alt="a header image with a grey background, with text saying 'Mildly Pepper'. A sketch of a cat is on the right side, and there is a grimy texture over the image." src="https://mildlypepper.net/media/site/headerImage.png">
                    <label for="burger" onmousedown="javascript:playSound('key-select')" class="nav_label"><img style="height: 32px; width: 32px; border: none; box-shadow: none; filter: none;" src="https://mildlypepper.net/media/site/burger.png"></label>
                </div>
                <!-- ----------mobile header------------- -->
                <input type="checkbox" id="burger" class="nav_checkbox">
                <div class="nav_content">
                    <!-- misc website info lives here-->
                    <div id="utilities-mobile">
                        <div class="box" style="display: flex; flex-wrap: wrap; max-width: 12em;">
                            <img src="https://mildlypepper.net/media/gif_collection/paws.gif" style="padding: 0.125em; width: 4.125em;height: 1.5em;">
                            <a href="https://www.mabsland.com/Adoption.html"><img src="https://mildlypepper.net/media/buttons/Censor_Mc.gif"title="site intended for viewers 18+" style="padding: 0.125em; width: 4.125em;height: 1.5em;"></a>
                            <a href="https://www.sublimetext.com/"><img src="https://mildlypepper.net/media/gif_collection/sublime.png" style="padding: 0.125em; width: 4.125em;height: 1.5em;"></a>
                            <img src="https://mildlypepper.net/media/gif_collection/button_queer_coded.png" style="padding: 0.125em; width: 4.125em;height: 1.5em;">
                            <img src="https://mildlypepper.net/media/gif_collection/gnu-linux.gif" style="padding: 0.125em; width: 4.125em;height: 1.5em;">
                            <a href="https://moonpr1sm.com/random/30plusclub"><img src="https://mildlypepper.net/media/buttons/30plusclub.gif" style="padding: 0.125em; width: 4.125em;height: 1.5em;"></a>
                            <a href="https://mildlypepper.net/blog/posts/2026-02-27-The-Things-Worth-Doing.html">site manifesto</a>
                        <div class="box" style="background: none; border: none; max-width: 11em; display: flex; flex-wrap: wrap;">
                            <img src="https://mildlypepper.net/media/gif_collection/kirbygif.gif" style="padding: 0.125em; max-width: 2em;">
                            <a href="https://www.grrrl.valentinely.cc/"><img src="https://mildlypepper.net/media/gif_collection/madebya2-4.png" style="padding: 0.125em; max-width: 2.75em;"></a>
                        </div>
                        <pre>‾`~._.~´‾`~._.⛤ </pre>
                        <span style="font-size: smaller;">you are viewing the mobile version of the site! you'll have basic funtionality but please come back again on a PC, as that is the canon version :3</span>
                        </div>
                    </div>

                    <!-- script to play audio on keypress -->
                    <!-- i sampled the keypresses myself from a keyboard from the 80s lol -->
                    <script>
                        function playSound(ins){
                            document.getElementById(ins).play();
                        };
                    </script>
                    <audio id="key-select"  src="https://mildlypepper.net/media/site/keySelect.ogg" preload="auto"></audio>
                    <audio id="key-press"  src="https://mildlypepper.net/media/site/keyPressed.ogg" preload="auto"></audio>
                    <nav id="navbar-mobile">
                        <ul>
                            <li><a onmousedown="javascript:playSound('key-press')" href="https://mildlypepper.net/">
                              <img style="max-width:8em;"  src="https://mildlypepper.net/media/site/home.png" ></a></li>
                            <li><a onmousedown="javascript:playSound('key-press')" href="https://mildlypepper.net/art/">
                              <img src="https://mildlypepper.net/media/site/digitalArt.png"style="max-width:8em;"></a></li>
                            <li><a onmousedown="javascript:playSound('key-press')" href="https://mildlypepper.net/photography/">
                              <img src="https://mildlypepper.net/media/site/photography.png"style="max-width:8em;"></a></li>
                            <li><a onmousedown="javascript:playSound('key-press')" href="https://mildlypepper.net/about/">
                              <img src="https://mildlypepper.net/media/site/aboutMe.png"style="max-width:8em;"></a></li>
                            <li><a onmousedown="javascript:playSound('key-press')" href="https://mildlypepper.net/blog/">
                              <img src="https://mildlypepper.net/media/site/blogbutton.png"style="max-width:8em;"></a></li>
                            
                            <li><a onmousedown="javascript:playSound('key-press')" href="https://mildlypepper.atabook.org/">
                              <img src="https://mildlypepper.net/media/site/guestbookButton.png"style="max-width:8em;"></a></li>
                            <li><a onmousedown="javascript:playSound('key-press')" href="https://mildlypepper.net/collections/">
                              <img src="https://mildlypepper.net/media/site/collectionsButton.png"style="max-width:8em;"></a></li>
                            <li><a onmousedown="javascript:playSound('key-press')" href="https://mildlypepper.net/external/">
                                <img src="https://mildlypepper.net/media/site/linksButton.png"style="max-width:8em;"></a></li>
                            <li><a onmousedown="javascript:playSound('key-press')" href="https://mildlypepper.net/sitemap/">
                              <img src="https://mildlypepper.net/media/site/sitemapButton.png"style="max-width:8em;"></a></li>
                        </ul>
                    </nav>
                </div>
...

CSS:
Code
.nav_checkbox:checked+.nav_content {
    display: flex;
    position: absolute;
    /*width: 100%;*/
    max-width: 48em;
    flex-direction: row;
    justify-content: safe center;
    color: #3d010d;
    /*background-color: #272727;*/
    z-index: 999;
    background-image: url('https://mildlypepper.net/media/site/mobilenavbg.png');
    background-position: center;
    background-size: auto;
    background-repeat: no-repeat;
}

#utilities-mobile{
    display: flex;
    flex: 2;
    flex-direction: column;
    flex-wrap: wrap;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 0.5em;
    padding-right: 0.5em;
    max-width: 13em;
}

#header_box{
  display: flex;
  flex-direction: row;
  justify-content: center;
}

header {
    max-width: 51em;
    margin: 0 auto;
    padding-top: 0.25em;
    padding-left: 0.5em;
}

#headerimg {
    width: 100%;
}
#navbar-mobile {
  display: flex;
    padding-top: 0.5em;
    background-position: center;
    background-size: 100% 5em;
    background-repeat: no-repeat;
}
#navbar-mobile ul {
    display: flex;
    flex:1;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style-type: none;
    justify-content: flex-start;
}
#navbar-mobile li a {
    padding-top: 0.625em;
    padding-bottom: 0.625em;
}
#navbar-mobile li {
    /*padding-right: 0.625em;*/
}
...

Logged

  :dog:  I'm verbose. Sorry! (not sorry)

https://mildlypepper.net/media/buttons/pepper-button.png     https://mildlypepper.net/media/gif_collection/noai_tiny.png

Artifact Swap: Puff Creaturesmuggler?? i hardly knower!Monster CreatureSquirtle!!!!
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 MelonLand Zap! Want to Login or Join ? Forum Art Hub Chat Webring Editor Recent Edits Tenement Arcade Web Guides Graphics Catalogue Wiki Newsletters Image Stream
Melon's Sites TamaNotchi Textures PixelSea GifyPet MoMG Ozwomp Online Loom Videos Leaky Webring Melonking
Tools Melon Software ArtHub Embed Maker ML Passports
Outlinks Webrings Internet Phone Book HTML Energy Declarations Hackers & Designers Frutiger Aero Forum m15o's Web Services 32Bit Cafe iMood
Minecraft: Online
Join: craft.melonking.net