Jump to content

Horizontal menu background


Boyanov

Recommended Posts

Hello,

 

I make my own css menu, but its transparent; how to make it with white background? And what need to delete to make all categories in one line ? please help.

 

This is the code - http://pcarena.gr is my website

/**
* Transition-timing-function property@mixin 
*/
/*background RGBA
============================================*/
/****/
/* RIGHT TO LEFT */
/**
 * Web Application Prefix Apply For Making Owner Styles
 */
/**
 *   Blocks Layout Selectors 
 */
/***********************************************************************/
/** CHECKOUT BY STEP */
/*** ESSENTIAL STYLES ***/
.sf-contener {
  clear: both;
  float: left;
  width: 100%;
  height: 77px;
}
.rtl .sf-contener {
  float: right;
}

ul.sf-menu,
ul.sf-menu li {
  list-style: none;
}
ul.sf-menu,
ul.sf-menu ul,
ul.sf-menu ol,
ul.sf-menu li,
ul.sf-menu a,
ul.sf-menu span,
ul.sf-menu div {
  margin: 0;
  padding: 0;
}
ul.sf-menu {
  line-height: 1.0;
  z-index: 497;
}
ul.sf-menu ul {
  left: 0;
  position: absolute;
  top: -9999px;
  width: 12em;
}
ul.sf-menu ul li {
  width: 100%;
}
ul.sf-menu li {
  float: left;
  position: relative;
  z-index: 498;
}
ul.sf-menu a,
ul.sf-menu span.nolink {
  display: block;
  padding: 1em 1.5em;
  position: relative;
}
ul.sf-menu li:hover,
ul.sf-menu li.sfHover,
ul.sf-menu li:hover ul,
ul.sf-menu li.sfHover ul {
  z-index: 499;
}
ul.sf-menu li:hover > ul,
ul.sf-menu li.sfHover > ul {
  left: 0;
  top: 2.5em;
}
ul.sf-menu li li:hover > ul,
ul.sf-menu li li.sfHover > ul {
  left: 12em;
  top: 0;
}
ul.sf-menu.menu,
ul.sf-menu.menu ul,
ul.sf-menu.menu li {
  margin: 0;
  padding: 0;
}
/**
 * Arrows.
 */
ul.sf-menu .sf-with-ul {
  padding-right: 3em;
}
ul.sf-menu .sf-sub-indicator {
  height: 12px;
  line-height: 9999px;
  opacity: 0.75;
  overflow: hidden;
  position: absolute;
  right: 0.75em;
  speak: none;
  text-indent: -9999px;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -o-transform: translateY(-50%);
  transform: translateY(-50%);
  width: 12px;
}
ul.sf-menu .sf-sub-indicator:after {
  content: "▼";
  left: 0;
  line-height: 1;
  position: absolute;
  text-indent: 0;
  top: 0;
}
ul.sf-menu ul .sf-sub-indicator:after {
  content: "►";
}
ul.sf-menu a:focus > .sf-sub-indicator,
ul.sf-menu a:hover > .sf-sub-indicator,
ul.sf-menu a:active > .sf-sub-indicator,
ul.sf-menu li:hover > a > .sf-sub-indicator,
ul.sf-menu li.sfHover > a > .sf-sub-indicator,
ul.sf-menu span.nolink:hover > .sf-sub-indicator,
ul.sf-menu li:hover > span.nolink > .sf-sub-indicator,
ul.sf-menu li.sfHover > span.nolink > .sf-sub-indicator {
  opacity: 1;
}
/**
 * Shadow.
 */
ul.sf-menu.sf-horizontal.sf-shadow ul,
ul.sf-menu.sf-vertical.sf-shadow ul,
ul.sf-menu.sf-navbar.sf-shadow ul ul {
  -webkit-box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
  -moz-box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
  box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}
ul.sf-menu.sf-shadow ul.sf-shadow-off {
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
}
/**
 * Multi-column sub-menus.
 * Supersubs.js can adjust column widths too and this is a fallback.
 */
ul.sf-menu li.sf-multicolumn-column {
  display: inline;
  float: left;
}
ul.sf-menu li.sf-parent-children-1 ul.sf-multicolumn {
  width: 12em;
}
ul.sf-menu li.sf-parent-children-2 ul.sf-multicolumn {
  width: 24em;
}
ul.sf-menu li.sf-parent-children-3 ul.sf-multicolumn {
  width: 36em;
}
ul.sf-menu li.sf-parent-children-4 ul.sf-multicolumn {
  width: 48em;
}
ul.sf-menu li.sf-parent-children-5 ul.sf-multicolumn {
  width: 60em;
}
ul.sf-menu li.sf-parent-children-6 ul.sf-multicolumn {
  width: 72em;
}
ul.sf-menu li.sf-parent-children-7 ul.sf-multicolumn {
  width: 84em;
}
ul.sf-menu li.sf-parent-children-8 ul.sf-multicolumn {
  width: 96em;
}
ul.sf-menu li.sf-parent-children-9 ul.sf-multicolumn {
  width: 108em;
}
ul.sf-menu li.sf-parent-children-10 ul.sf-multicolumn {
  width: 120em;
}
ul.sf-menu li.sf-multicolumn-column:nth-child(1):nth-last-child(2),
ul.sf-menu li.sf-multicolumn-column:nth-child(2):nth-last-child(1) {
  width: 50%;
}
ul.sf-menu li.sf-multicolumn-column:nth-child(1):nth-last-child(3),
ul.sf-menu li.sf-multicolumn-column:nth-child(2):nth-last-child(2),
ul.sf-menu li.sf-multicolumn-column:nth-child(3):nth-last-child(1) {
  width: 32.333%;
}
ul.sf-menu li.sf-multicolumn-column:nth-child(1):nth-last-child(4),
ul.sf-menu li.sf-multicolumn-column:nth-child(2):nth-last-child(3),
ul.sf-menu li.sf-multicolumn-column:nth-child(3):nth-last-child(2),
ul.sf-menu li.sf-multicolumn-column:nth-child(4):nth-last-child(1) {
  width: 25%;
}
ul.sf-menu li.sf-multicolumn-column:nth-child(1):nth-last-child(5),
ul.sf-menu li.sf-multicolumn-column:nth-child(2):nth-last-child(4),
ul.sf-menu li.sf-multicolumn-column:nth-child(3):nth-last-child(3),
ul.sf-menu li.sf-multicolumn-column:nth-child(4):nth-last-child(2),
ul.sf-menu li.sf-multicolumn-column:nth-child(5):nth-last-child(1) {
  width: 20%;
}
ul.sf-menu li.sf-multicolumn-column:nth-child(1):nth-last-child(6),
ul.sf-menu li.sf-multicolumn-column:nth-child(2):nth-last-child(5),
ul.sf-menu li.sf-multicolumn-column:nth-child(3):nth-last-child(4),
ul.sf-menu li.sf-multicolumn-column:nth-child(4):nth-last-child(3),
ul.sf-menu li.sf-multicolumn-column:nth-child(5):nth-last-child(2),
ul.sf-menu li.sf-multicolumn-column:nth-child(6):nth-last-child(1) {
  width: 16.665%;
}
ul.sf-menu li.sf-multicolumn-column:nth-child(1):nth-last-child(7),
ul.sf-menu li.sf-multicolumn-column:nth-child(2):nth-last-child(6),
ul.sf-menu li.sf-multicolumn-column:nth-child(3):nth-last-child(5),
ul.sf-menu li.sf-multicolumn-column:nth-child(4):nth-last-child(4),
ul.sf-menu li.sf-multicolumn-column:nth-child(5):nth-last-child(3),
ul.sf-menu li.sf-multicolumn-column:nth-child(6):nth-last-child(2),
ul.sf-menu li.sf-multicolumn-column:nth-child(7):nth-last-child(1) {
  width: 14.2855%;
}
ul.sf-menu li.sf-multicolumn-column:nth-child(1):nth-last-child(8),
ul.sf-menu li.sf-multicolumn-column:nth-child(2):nth-last-child(7),
ul.sf-menu li.sf-multicolumn-column:nth-child(3):nth-last-child(6),
ul.sf-menu li.sf-multicolumn-column:nth-child(4):nth-last-child(5),
ul.sf-menu li.sf-multicolumn-column:nth-child(5):nth-last-child(4),
ul.sf-menu li.sf-multicolumn-column:nth-child(6):nth-last-child(3),
ul.sf-menu li.sf-multicolumn-column:nth-child(7):nth-last-child(2),
ul.sf-menu li.sf-multicolumn-column:nth-child(8):nth-last-child(1) {
  width: 14.2855%;
}
ul.sf-menu li.sf-multicolumn-column:nth-child(1):nth-last-child(9),
ul.sf-menu li.sf-multicolumn-column:nth-child(2):nth-last-child(8),
ul.sf-menu li.sf-multicolumn-column:nth-child(3):nth-last-child(7),
ul.sf-menu li.sf-multicolumn-column:nth-child(4):nth-last-child(6),
ul.sf-menu li.sf-multicolumn-column:nth-child(5):nth-last-child(5),
ul.sf-menu li.sf-multicolumn-column:nth-child(6):nth-last-child(4),
ul.sf-menu li.sf-multicolumn-column:nth-child(7):nth-last-child(3),
ul.sf-menu li.sf-multicolumn-column:nth-child(8):nth-last-child(2),
ul.sf-menu li.sf-multicolumn-column:nth-child(9):nth-last-child(1) {
  width: 11.111%;
}
ul.sf-menu li.sf-multicolumn-column:nth-child(1):nth-last-child(10),
ul.sf-menu li.sf-multicolumn-column:nth-child(2):nth-last-child(9),
ul.sf-menu li.sf-multicolumn-column:nth-child(3):nth-last-child(8),
ul.sf-menu li.sf-multicolumn-column:nth-child(4):nth-last-child(7),
ul.sf-menu li.sf-multicolumn-column:nth-child(5):nth-last-child(6),
ul.sf-menu li.sf-multicolumn-column:nth-child(6):nth-last-child(5),
ul.sf-menu li.sf-multicolumn-column:nth-child(7):nth-last-child(4),
ul.sf-menu li.sf-multicolumn-column:nth-child(8):nth-last-child(3),
ul.sf-menu li.sf-multicolumn-column:nth-child(9):nth-last-child(2),
ul.sf-menu li.sf-multicolumn-column:nth-child(10):nth-last-child(1) {
  width: 10%;
}
/**
 * "Vertical" type.
 */
ul.sf-menu.sf-vertical {
  width: 12em;
}
ul.sf-menu.sf-vertical li {
  width: 100%;
}
ul.sf-menu.sf-vertical li:hover > ul,
ul.sf-menu.sf-vertical li.sfHover > ul {
  left: 12em;
  top: 0;
}
ul.sf-menu.sf-vertical .sf-sub-indicator:after {
  content: "►";
}
/**
 * "Navbar" type.
 */
ul.sf-menu.sf-navbar {
  position: relative;
}
ul.sf-menu.sf-navbar li {
  position: static;
}
ul.sf-menu.sf-navbar li li {
  position: relative;
}
ul.sf-menu.sf-navbar li ul,
ul.sf-menu.sf-navbar li li li {
  width: 100%;
}
ul.sf-menu.sf-navbar li li {
  width: auto;
  float: left;
}
ul.sf-menu.sf-navbar li li:hover > ul,
ul.sf-menu.sf-navbar li li.sfHover > ul,
ul.sf-menu.sf-navbar > li.active-trail > ul {
  left: 0;
  top: 2.5em;
}
ul.sf-menu.sf-navbar li li li:hover > ul,
ul.sf-menu.sf-navbar li li li.sfHover > ul {
  left: 12em;
  top: 0;
}
ul.sf-menu.sf-navbar ul .sf-sub-indicator:after {
  content: "▼";
}
ul.sf-menu.sf-navbar ul ul .sf-sub-indicator:after {
  content: "►";
}
/**
 * sfSmallscreen.
 */
ul.sf-menu.sf-accordion {
  display: none;
  position: absolute;
}
ul.sf-menu.sf-accordion,
ul.sf-menu.sf-accordion ul,
ul.sf-menu.sf-accordion li {
  float: left;
  width: 100%;
}
ul.sf-menu.sf-accordion ul {
  margin: 0;
  padding: 0;
}
ul.sf-menu.sf-accordion.sf-expanded,
ul.sf-menu.sf-accordion li.sf-expanded > ul {
  left: auto !important;
  position: relative;
  top: auto !important;
}
ul.sf-menu.sf-accordion .sf-sub-indicator:after {
  content: "▼";
}
ul.sf-menu.sf-accordion.sf-accordion-with-buttons .sf-accordion-button:after {
  content: "▼";
  margin: 0 0 0 1em;
}
ul.sf-menu.sf-accordion.sf-accordion-with-buttons li.sf-expanded > .sf-accordion-button:after {
  content: "▲";
}
/**
 * RTL support.
 */
ul.sf-menu.rtl,
ul.sf-menu.rtl li {
  float: right;
}
ul.sf-menu.rtl li:hover > ul,
ul.sf-menu.rtl li.sfHover > ul {
  left: auto;
  right: 0;
}
ul.sf-menu.rtl li li:hover > ul,
ul.sf-menu.rtl li li.sfHover > ul {
  left: auto;
  right: 12em;
}
ul.sf-menu.rtl ul {
  left: auto;
  right: 0;
}
ul.sf-menu.rtl .sf-sub-indicator {
  left: 0.75em;
  right: auto;
}
ul.sf-menu.rtl.sf-horizontal ul .sf-sub-indicator:after {
  content: "◄";
}
ul.sf-menu.rtl.sf-horizontal.sf-shadow ul,
ul.sf-menu.rtl.sf-vertical.sf-shadow ul,
ul.sf-menu.rtl.sf-navbar.sf-shadow ul ul {
  -webkit-box-shadow: -2px 2px 10px rgba(0,0,0,0.5);
  -moz-box-shadow: -2px 2px 10px rgba(0,0,0,0.5);
  box-shadow: -2px 2px 10px rgba(0,0,0,0.5);
}
ul.sf-menu.rtl li.sf-multicolumn-column {
  float: right;
}
ul.sf-menu.rtl.sf-vertical li:hover > ul,
ul.sf-menu.rtl.sf-vertical li.sfHover > ul {
  left: auto;
  right: 12em;
}
ul.sf-menu.rtl.sf-vertical .sf-sub-indicator:after {
  content: "◄";
}
ul.sf-menu.rtl.sf-navbar li li {
  float: right;
}
ul.sf-menu.rtl.sf-navbar ul ul .sf-sub-indicator:after {
  content: "◄";
}
ul.sf-menu.rtl.sf-navbar li li:hover > ul,
ul.sf-menu.rtl.sf-navbar li li.sfHover > ul {
  left: auto;
  right: 0;
}
ul.sf-menu.rtl.sf-navbar li li li:hover > ul,
ul.sf-menu.rtl.sf-navbar li li li.sfHover > ul {
  left: auto;
  right: 12em;
}
ul.sf-menu.rtl.sf-accordion.sf-expanded,
ul.sf-menu.rtl.sf-accordion li.sf-expanded > ul {
  right: auto !important;
}

.cat-title {
  display: none;
}
@media (max-width: 991px) {
  .cat-title {
    display: block;
    text-transform: uppercase;
    color: white;
    display: block;
    background: #FF0000;
    position: relative;
    width: 40px;
    height: 40px;
    line-height: 40px;
    margin-top: 18px;
    margin-bottom: 19px;
    font-size: 20px;
    text-align: center;
    display: inline-block;
    cursor: pointer;
    border: none;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    -ms-border-radius: 3px;
    -o-border-radius: 3px;
    border-radius: 3px;
  }
  .cat-title:hover {
    background: #FF0000;
  }
}

.sf-menu li.sf-search {
  border: none;
}
.sf-menu li.sf-search input {
  display: inline;
  padding: 0 13px;
  height: 30px;
  line-height: 30px;
  background: white;
  margin: 13px 10px 0 0;
  font-size: 13px;
  color: #555555;
  border: 1px solid #ededed;
}
.rtl .sf-menu li.sf-search input {
  margin: 13px 0 0 10px;
}
Link to comment
Share on other sites

For this element add background:

 

ul.sf-menu li:hover > ul,

ul.sf-menu li.sfHover > ul {

left: 0;

top: 2.5em;

}

 

Category are not in one line because container is too small, you need to expand menu container by changing his class col-sm-9 to col-sm-10 and col-lg-9 to col-lg-10, also you need to change login box container from col-lg-3 to col-lg-2 and col-sm-3 to col-md-2.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...