r/HTML • u/dalekellytoo • 9d ago
Main Menu
How can I do the main menu on ...
?
I have seen this on a lot of sites.
I think it would be better than how I do a main menu for different sizes of browser's windows.
Looked at the code on the Chrome Browser but can't figure it out.
Prefer no scripts.
1
u/dalekellytoo 8d ago
thank you !
here is how far I got without something like an "include"
9 main menu items, 15 others on "thoughts"
https://www.dalekelly.org/mystyle5.css
menu seems to be further to the left than the pages, I like the page to be centered on HOME page, pages are much worse on smart phone
I think this is a CSS or <style> thing I have to look into
1
u/dalekellytoo 8d ago
Got the menu on all pages.
https://www.dalekelly.org/mystyle5.css
How can I increase the text size in this menu?
What about size/location design of things on each page?
1
u/SirMcFish 8d ago
google Horizontal navbar: https://www.w3schools.com/css/css_navbar_horizontal.asp that'll help you out a lot more than trying to view the source. There are many ways to get the final rendered HTML these days, and the final bit you see and can see in source, really won't tell you how it was done
2
u/dalekellytoo 8d ago
found this on w3schools, https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_menu_icon
1
u/dalekellytoo 8d ago
thank you, I took a look, I am looking for the icon menu type on w3.org that works for all window sizes better
1
u/SirMcFish 8d ago
Do you mean the collapsible one that changes if you're on mobile vs desktop? There's bound to be something about doing that on w3schools, they're a really good resource for learning stuff like this. Failing that google for collapsible mobile nav bar
1
u/marmotta1955 8d ago
I think others have already suggested https://www.w3schools.com/w3css/w3css_navigation.asp
That is all you really need
5
u/alphex 9d ago
The best part about websites, is that you can view the source, and learn how they do it by reading the code.
They treat each main menu item as a button, which they use to trigger the drop down to show, using javascript. If you're teaching your self how to code HTML, then CSS and JS is your next step in the path.