Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

responsive menu

Kracov

New Coder
Does anyone know how to make my website menu more responsive, as in mobile friendly? Site: Kracov's Domain

Code
Code:
@font-face {
  font-family: 'Samhain';
  src: url('https://kracov.org/fonts/Samhain.eot'); /* IE9 Compat Modes */
  src: url('https://kracov.org/fonts/Samhain.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('https://kracov.org/fonts/Samhain.woff2') format('woff2'), /* Super Modern Browsers */
       url('https://kracov.org/fonts/Samhain.woff') format('woff'), /* Pretty Modern Browsers */
       url('https://kracov.org/fonts/Samhain.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('https://kracov.org/fonts/Samhain.svg#svgFontName') format('svg'); /* Legacy iOS */
}
/*.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: black;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  padding: 12px 16px;
  z-index: 1;
}

.dropdown:hover .dropdown-content {
  display: block;
}*/
#menu-kracmenu {
    font-family: 'Samhain';
    margin-top: 110px;
    justify-content: center;
    width: 786px;
    margin-left: -393px;
}
ul#menu-kracmenu.menu li a {
    font-family: 'Samhain';
        font-size: 22px;
}
ul#menu-kracmenu.menu ul.sub-menu a {
    font-family: 'Verdana';
 
Does anyone know how to make my website menu more responsive, as in mobile friendly? Site: Kracov's Domain

Code
Code:
@font-face {
  font-family: 'Samhain';
  src: url('https://kracov.org/fonts/Samhain.eot'); /* IE9 Compat Modes */
  src: url('https://kracov.org/fonts/Samhain.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('https://kracov.org/fonts/Samhain.woff2') format('woff2'), /* Super Modern Browsers */
       url('https://kracov.org/fonts/Samhain.woff') format('woff'), /* Pretty Modern Browsers */
       url('https://kracov.org/fonts/Samhain.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('https://kracov.org/fonts/Samhain.svg#svgFontName') format('svg'); /* Legacy iOS */
}
/*.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: black;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  padding: 12px 16px;
  z-index: 1;
}

.dropdown:hover .dropdown-content {
  display: block;
}*/
#menu-kracmenu {
    font-family: 'Samhain';
    margin-top: 110px;
    justify-content: center;
    width: 786px;
    margin-left: -393px;
}
ul#menu-kracmenu.menu li a {
    font-family: 'Samhain';
        font-size: 22px;
}
ul#menu-kracmenu.menu ul.sub-menu a {
    font-family: 'Verdana';
Idk how to do it, but friggin sweet website!
 
Here's a decent start. For MOBILE:

.site-header .header-inner: remove width and max-width
#menu-kracmenu: remove margin-top and margin-left. Change width to 100%.

Also, I would not use hover for the dropdowns. I would use click. Better for mobile as well as better accessibility.

I'd also not do what you are doing for .site-title and just put your logo in there. You can wrap it in the link. Add good alt text on the logo. Making it a real item on the page will push the menu down under the logo.

Let me know if this isn't clear or have any questions.

1753816620270.webp
 
Last edited:
Back
Top Bottom