So ive been trying to change the drop down menu from the Dropdown Navbar to a Subnav (Posted a pic). Is there a way to get this?
Sure. That's just presentation. Short version: remove the width restriction on your drop menu, and set the li's to display: inline-block;
That will get you a basic dropline, after which it's just a case of tweaking the eye candy until it looks just how you want it.
Do note that although they're fine on touchscreen, they tend to be a bit of a PITA with a mouse. That's because you have to track around a right angle corner to get to the links, which isn't as natural. You can alleviate this by going with click activation instead of hover, which allows tracking the cursor diagonally straight to the link you want, but it's still a little more awkward.
ok where do i go to do that
What theme are you using?
Curve
Ok, hang on and I'll fire it up on local.
If you add this to the end of index.css it will give you the basics.
.dropmenu {
position: relative;
}
.dropmenu>li {
position: static;
}
.dropmenu li ul {
width: 100%;
box-sizing: border-box;
left: 0;
background: #fff;
border: 1px solid #999;
}
.dropmenu li li {
width: auto;
float: none;
position: static;
display: inline-block;
border: 0;
}
#admin_menu ul ul {
margin: 0;
}
Didnt do anything
Hard refresh your browser.
still nothing did it from chrome and internet explorer
I got it now was missing a line of code
Good. :)
As I said, this is just basic functionality. Up to you how much eye candy and other trickery you want to add.
Will that code work for all themes?
The basic principles should, but different themes may use different structures, classes and id's for their menus. It depends on the whims of the theme's author. So the answer is a maybe, but probably ends up being a no in a lot of cases. But even when it's a no, you can still adapt the idea to work with that theme.
could you do possibly one more?
Ok. Lay it on me.
its Deception the theme is no longer available tho so idk if you will be able to do it
I'll take a look around.
I'm running the theme now I'm my website just can't get the colors right
Can't see any downloads of it anywhere. Do you have a copy of it?
Or just link me to your site. That would work too.
http://infantrygaming.com/
#topnav li {
position: static;
}
#topnav li ul {
position: absolute;
width: 40em;
left: 0;
}
#topnav li li, #topnav li:hover li {
float: none;
width: 220px;
display: inline-block;
}
Quote from: ToxicDocter on August 25, 2020, 05:43:10 AM
http://infantrygaming.com/
Where is the copyright notice gone to? ::)
I also like the dirty hack to remove index.php from the URL guaranteeing that first time users are served with no theme.
Quote from: Arantor on August 25, 2020, 06:43:18 AM
I also like the dirty hack to remove index.php from the URL guaranteeing that first time users are served with no theme.
Ha, I was wondering why that happened... yuck.
Yup, if you hack QueryString.php to change the definition of $scripturl to not have index.php in it, this happens. The mod which does it does this too, which is why I kept asking for it to be removed.
Quote from: @rjen on August 25, 2020, 07:29:13 AM
Quote from: Arantor on August 25, 2020, 06:43:18 AM
I also like the dirty hack to remove index.php from the URL guaranteeing that first time users are served with no theme.
Ha, I was wondering why that happened... yuck.
Thanks for letting me know about that and the copyright i was messing around in the template
Quote from: Antechinus on August 25, 2020, 06:04:50 AM
#topnav li {
position: static;
}
#topnav li ul {
position: absolute;
width: 40em;
left: 0;
}
#topnav li li, #topnav li:hover li {
float: none;
width: 220px;
display: inline-block;
}
I combined the 2 and added a subnav is there stuff thats not needed in there?
}
.dropmenu {
position: relative;
}
.dropmenu>li {
position: static;
}
.dropmenu li ul {
width: 100%;
box-sizing: border-box;
left: 0;
border: 1px solid #999;
}
.dropmenu li li {
width: auto;
float: none;
position: static;
display: inline-block;
border: 0;
}
#admin_menu ul ul {
margin: 0;
}
#subnav {
position: fixed;
float: left;
overflow: hidden;
}
#topnav li {
position: static;
}
#topnav li ul {
box-sizing: border-box;
width: 100%;
left: 0;
border: 1px solid #999;
}
#topnav li li, #topnav li:hover li {
float: none;
width: auto;
position: static;
display: inline-block;
border: 0;
}
margin: 0;
}
not sure what this is
Quote
Copyright © 2020 Simple Machines. All Rights Reserved.
We don't own a copyright to anything on your site... only to the software. So adding that line is improper.
Quote
SMF 2.0.17 | SMF © 2019, Simple Machines
this is the only copyright that we expect to see.
ok thanks i changed it so hopefully its good now
why do you have anything manually in there at all?
the automatic copyright notice was restored and is displayed... you don't need a manual one as well.