Site logo

Archived topic

Useful CSS for Generatepresss

2 replies · Started by Sars on March 16, 2021

Viewing posts 1–3 of 3

Lets share the CSS that worked well for your site with comments. So that Others can use it. I felt that having a single section where people can share their useful CSS may help others.

/* Remove header title on single page */
.page .entry-header,
.single .entry-header {
      display:none;
}
/* Remove header title on single page */

/* Add Padding to submenu */

.secondary-navigation .main-nav ul ul li a {
    padding-left: 40px;
    padding-right: 40px;
}
/* End */

/* Remove Arrow dropdown icon on menu, Add dropdown arrow icon on submenu */
@media (min-width: 769px) {
    .secondary-navigation .main-nav > ul >li.menu-item-has-children > a > .dropdown-menu-toggle {
        display: none;
    }
    .secondary-navigation .main-nav > ul >li.menu-item-has-children > a {
        padding-right: 68px;
    }
}

/* Stop overflow */
html {
  overflow-x: hidden;
}
/* End */

/* Set Fixed width to slideout menu */
.slideout-navigation.main-navigation .main-nav ul li a,
.slideout-navigation.main-navigation .menu-item-has-children .dropdown-menu-toggle{
  padding-left: 20px;
  padding-right: 20px;
}
/* End */

/* Allign menus to right. Move primeru icons to next line from logo! */
@media (max-width: 600px) {
  .has-inline-mobile-toggle .mobile-menu-control-wrapper {
    flex-wrap: nowrap;
    margin-left: unset;
    margin-top: 10px;
    flex: 1;
  }

  .main-navigation .menu-bar-items {
    flex: 1 0 calc(100% - 70px);
    justify-content: space-evenly;
  }

  .menu-toggle.secondary-menu-toggle {
    text-align: right;
  }

}
/* End! */

I agree! It would be helpful to have some kind of archive with CSS or PHP snippets. On the other hand, it is surprisingly easy to find useful posts here by Google search and even the built-in search. However, an archive would be very, very nice.

Thanks for sharing - i agree for some things a library of CSS snippets would be handy ... the problem is a lot of the solutions we provide are very specific to the users particular site so wouldn't be relative for another site :(

This archived topic is closed to new replies.