Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

NavBar Color Changes

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 04-14-2016, 07:01 AM
 
superdave144 superdave144 is offline
 

Advanced Member
  
Join Date: Sep 2015
Posts: 77
 

Default NavBar Color Changes

What is the custom CSS I need to add to change the colors of the navigation bar? I need to set a normal color and a hover color.
__________________
David
X-Cart Business 5.3.2.2
Reply With Quote
  #2  
Old 04-14-2016, 09:50 AM
 
superdave144 superdave144 is offline
 

Advanced Member
  
Join Date: Sep 2015
Posts: 77
 

Default Re: NavBar Color Changes

I need to change all 3 colors and I'm having a hard time locating the proper CSS code. I need the normal color, the hover color and the active color. The font color can stay the same.
__________________
David
X-Cart Business 5.3.2.2
Reply With Quote
  #3  
Old 04-14-2016, 04:59 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: NavBar Color Changes

Dave can you post a link to the page? Then we can inspect your CSS.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #4  
Old 04-14-2016, 08:13 PM
 
kevinrm kevinrm is offline
 

X-Wizard
  
Join Date: Aug 2003
Posts: 1,003
 

Default Re: NavBar Color Changes

This is the code I use to make it green:

/* nave bar color */
.navbar-inverse {
background-color: #4C6E14;
border-color: #164801;
}
__________________
X-Cart 5.4.1.39 Live
PHP 7.4.33
5.5.5-10.3.38-MariaDB MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
Reply With Quote

The following user thanks kevinrm for this useful post:
qualiteam (04-14-2016)
  #5  
Old 04-14-2016, 08:17 PM
 
kevinrm kevinrm is offline
 

X-Wizard
  
Join Date: Aug 2003
Posts: 1,003
 

Default Re: NavBar Color Changes

Further, I use this to control the font size of the navbar:

/*navbar text*/
.navbar-nav > li > a {
text-decoration: none;
text-align: center;
font-size: 0.8em;
padding-left: 25px;
padding-right: 25px;
}
__________________
X-Cart 5.4.1.39 Live
PHP 7.4.33
5.5.5-10.3.38-MariaDB MariaDB
Apache 2.4
CENTOS 7.8 64Bit Single Quad-Core E3-1241v3 3.4Ghz 8M 1600 w/ HT
32GB RAM 2x 512GB Samsung 850 Pro SSD RAID 1
Reply With Quote

The following user thanks kevinrm for this useful post:
qualiteam (04-14-2016)
  #6  
Old 04-15-2016, 12:26 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: NavBar Color Changes

Try this. You may want to change the actual colors though.
Code:
.navbar-inverse { background-color: #f00; border-color: #f00; } #top-main-menu > li:hover > a, .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus, .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:focus, .navbar-inverse .navbar-nav > .active > a:hover { background-color: #d00 !important; }
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
  #7  
Old 04-15-2016, 05:24 AM
 
superdave144 superdave144 is offline
 

Advanced Member
  
Join Date: Sep 2015
Posts: 77
 

Default Re: NavBar Color Changes

Thanks guys. The site is www.justretrogames.com. I was able to get most of the colors correct. Please see the code below. For some reason I still see a dark grey remnant when I click on links sometimes. What am I missing?
Code:
/* Sets color of navigation bar in mobile */ .mm-navbar { background: #195ad2; } /* Sets color of navigation bar mobile */ .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { /* Font Color */ color: #fff; /* Active Cell Color*/ background-color: #1c4ba1; } #top-main-menu>li>span.primary-title.tap, #top-main-menu>li>a.tap, #top-main-menu>li:hover>span.primary-title, #top-main-menu>li:hover>a { /* Hover Color*/ background-color: #2068ee; } .navbar-inverse { /* Background Color*/ background-color: #195ad2; /* Menu Border Color*/ border-color: #195ad2; }
__________________
David
X-Cart Business 5.3.2.2

Last edited by qualiteam : 04-18-2016 at 01:32 AM.
Reply With Quote
  #8  
Old 04-18-2016, 01:27 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: NavBar Color Changes

The dark gray background comes from this rule:
Code:
.navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { color: #fff; background-color: #363636; }

You should add rule that will override styles defined for ".navbar-inverse .navbar-nav > li > a:focus" selector.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #9  
Old 04-18-2016, 10:27 AM
 
superdave144 superdave144 is offline
 

Advanced Member
  
Join Date: Sep 2015
Posts: 77
 

Default Re: NavBar Color Changes

Ok that did it. Thank you!
__________________
David
X-Cart Business 5.3.2.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:58 PM.

   

 
X-Cart forums © 2001-2020