Wordpress toggle menu is not functioning - wordpress

Currently working on http://getfitquick.co.uk/ but have come into an issue, when the menu is viewed on Tablets/Mobile the menu is currently active with the toggle constantly on, would really like to remove this so that the user is able to click menu and allow the menu to appear as opposed to it always being active.
Would also like to mention for reference that on http://getfitquick.co.uk/shop/ the menu is actually appearing how I want it to, however I am a bit unsure how I did this,
Is there anything anyone could suggest? Maybe something I may have done wrong within the process?
Thanks for reading,

On the homepage there's a css code that runs display: inline-block !important; for .menu .nav
#media (max-width: 768px) (index):251
.menu .nav {
position: relative;
background-color: #000000;
left: 0px;
border-color: #e51d25;
display: inline-block !important;
}
that code will override the default behavior of the mobile nav
at the top of that code, there's a comment that says
/*
The following CSS generated by Yellow Pencil Plugin.
http://waspthemes.com/yellow-pencil
*/
So I'm not quit sure if that CSS is directly generated from that plugin option on the homepage or if its from a custom CSS code assign to that homepage,
the best way to fix that is to look for that code, its should be somewhere in the Yellow Pencil Plugin
The second option though is really a bad idea is to modify and override it
CSS Override
header .menu .nav {
display: none !important;
}
header .menu.active .nav {
display: block !important;
}
then add active when the button is click and remove it when click again,
jQuery
(function( $) {
$('header').on('click', '.menu .toggleMenu', function() {
$(this).parent().toggleClass('active');
});
})(jQuery);

Related

CSS display: none; not working in Firefox. How can I fix this?

I have a website which was created by someone else and I have been tasked with taking over. On this website there was a sandwich style menu and a search bar in the navigation.
I have since created a mega menu (WordPress Plugin). Now the older icons are redundant and useless therefore I have applied a display: none; rule to the CSS to remove them from the frontend.
This works correctly on Safari and Chrome on Mac however it seems as though Windows users on Firefox and Chrome as well as users of Firefox on Mac can still see the icons.
Can anyone help? The website is www.quanser.com. You will see the icons in the header to the right.
header.site-header .badge-links {
display: none !important;
}
I'm using Firefox on Windows and still can see the Search and Hamburger menu icon (my first time visiting your site), this means this has nothing to do with cache. Though usually working with Wordpress, you should clear the cache after changing some CSS.
So far, I've inspected the CSS and see that this CSS block is repeated 3 times, which the last block will look like:
.header.site-header .badge-links {
position: absolute;
top: -3px;
right: -.625rem;
}
Try to find this block in your CSS, and add something like this:
.header.site-header .badge-links {
position: absolute;
top: -3px;
right: -.625rem;
display: none;
}
You don't need to `!important` in your CSS in this case.
There is a pretty efficient way for solving this:
header.site-header .badge-links {
z-index:-100;
}
#media screen and (max-width: 992px) {
header.site-header .badge-links {
z-index:100;
}
#
}

Apply Coupon Button disappeared on Woocommerce Checkout

I've been reformatting the Coupon Code box on the Woocommerce checkout page. It was originally huge and at the top of the page, which is terrible design because people will see the big coupon code box and leave your site to go look for a coupon, then never come back.
I have the coupon box where I want and it works just fine if you press enter. The issue is that you can't see the Apply button. It is right below the coupon code box. If you hover over it, the little hand cursor appears. You just can't see it.
How can I get the button to appear to the right of the coupon code box on desktop? It'll get pushed below it on mobile.
You will have to add an item to the cart to see the checkout page: http://198.199.114.131/shop/
Checkout page: http://198.199.114.131/checkout/
Add this style to your theme style.css or any frontend custom css file:
form.checkout_coupon input[type="submit"] {
opacity: 1 !important;
color: #fff !important;
background-color: #dba633 !important;
width: 48% !important;
}
form.checkout_coupon{
width:100% !important;
}
form.checkout_coupon #coupon_code{
width:50% !important;
}
Add this:
input[name="apply_coupon"] {
opacity: 1 !important;
float: left;
background-color: bisque !important;
min-width: 100%;
margin-top: 1em !important;
}
From what I can see, it's the background: none !important; that's not letting you see anything near the coupon box. Remove that piece of code and you can see the button, however, there is no text on the button.
To put the button under the coupon code input box, remove the background: none !important; where you have specified it and then add the following code in your theme's custom CSS or child theme's CSS file:
.woocommerce-cart .entry-content .woocommerce .actions .coupon .button {
top: 60px;
}
Currently, top: 3px; is specified.
To display the text, add this code to your theme's custom CSS or child theme's CSS file:
.woocommerce-cart .entry-content .woocommerce .actions .coupon .button:before {
content: "Apply Coupon";
}
You can change the Apply Coupon text to whatever text you want to display there.
What I have offered above is a workaround as I do not know what edits you made to the coupon box during your reformatting, but it should solve your problem.
Hope this helps.

Menu items disappear after a second

I have a strange issue on a website I am trying to customize.
When I activate the Avada theme, the menu items in the navigation disappear, but I can hover over them. Also the social icons in the nav are not visible and no matter what options I select in Theme Options > Menu > Menu Options, they do not apply at all.
What I have tried until now:
Deactivated/Activated all the plugins
Deleted the demo content, reinstalled the theme. Still no result.
I took down the coming soon page. Here's a link to the website http://www.tipografiamarian.ro/ if you'd like to take a look. As you can see. while the page is loading, the navigation is visible for a second or so, then the elements in it disappear...
Has anyone else encountered this issue before?
Please help, thank you! :)
It's showing line-height:83; (instead of 83% or 83px etc) which is causing the issue. If this is from an external javascript, you can use following snippet to override this:
.fusion-main-menu > ul > li > a {
line-height: 83px !important;
}
I would suggest checking/editing your javascript for this.
when you check your code, some javascript runs, after page load
for your anchor tag, line-height:83; is addded, which means, line-height is 83 times of your font-size.
<span class="menu-text">Home</span>
add an unit to line-height value - 83px
.fusion-menu>.menu-item>a {line-height:83px;} // you can !important if you don't want to fix it via javascript/jquery
You have line-height:83px for the links. Just set a smaller value (you have a single row, so it can be what you want).
.fusion-main-menu ul {
list-style: none;
margin: 0;
padding: 0;
float: left;
}
.fusion-main-menu > ul > li > a {
height: 33px;
line-height: 33px;
margin: 20px 0;
}
I suggest you not adding style for menu from admin.
Add this and you are good to go
jQuery('.fusion-main-menu > ul > li > a').css('line-height','83px');

Squarespace remove drop down menu from main navigation with CSS

I really like how the FAQ page/questions look on the site I'm building using Squarespace. The only issue is that because of this structure, it also leads to a cumbersome drop down menu when you hover over the FAQ tab on the main navigation.
Here's a link: http://www.officialjerky.com/faq-1/
While it's certainly possible to set up anchored links in another FAQ page, I'm also sure there's a solution that will allow me to keep the structure of the page(s) and get rid of the drop down. Perhaps a bit of custom CSS that could make the drop down invisible?
There was a similar help thread that asked how to change the spacing between the items in the drop down, and the custom CSS input solution was: .primary-nav .folder-links-wrapper li { line-height: 0em; }.
Any guidance or input is really helpful. Thanks.
It's controlled by JS, so you may need a mini sledgehammer to override it. Try this in your CSS:
.subnav {display: none !important;}
Ideally, remove the script that is causing the behavior.
Regarding the + on small screens, on line 9865 of the stylesheet there is this:
#sidecarNav .folder label:before {
content: '+';
padding-right: .25em;
width: .75em;
display: inline-block;
}
You could either remove that code, or just add this to the stylesheet:
#sidecarNav .folder label:before {
display:none !important;
}

Wordpress CSS - problems with image buttons in menu disappearing when hovered over

I am trying to add custom images for social follow link buttons to my website sidebar menu. Right now I am stuck on the Facebook one as my first test, but ideally want to add others later. (which I am realizing might not be easy with the method I have chosen)
I tried using various methods, the most success I have gotten so far is the method at DIY Themes (this article) and on my site style.css the code I added is below:
#menu-item-127 a {
display:block;
height:83px; width:75px;
padding:0px;
margin-left:6px;
outline:none;
/*text-indent:-9999px;*/
background-image:url('/wp-content/uploads/2012/09/Grunge-Facebook-Stamp-small-sprite.png');
background-position:0 -82px;
}
#menu-item-127 a:hover { background-position:0 0px; }
The problem is that when you hover over the link the background image disappears, it does not transition to the "active" version of the sprite as it should.
Secondly the text does not indent off the screen, but stays on top of the image (I know that part is commented out in the code above, because I turned it on and off to test what was going on, doesn't make a difference)
Third problem is that the hover activation area is to large, it stretches the entire width of the menu bar instead of just right on top of the image. So if you are to the right of the image it is still considered "hovering", even though you cannot click on the FB link.
It seems to be related to some other part of my style.css because even if I remove the a:hover part of the above code it still makes the background image disappear. I have adjusted every variable and inspected every element that I know how, I am stumped on this.
My website is americagonepostal.com. The base theme is Hum.
BTW, I have never really done CSS before. I am doing this site as a favor for my cousin who is totally tech retarded, but is an artist so has very specific aesthetic expectations. I have just been hacking away without any idea what I am doing so if there is a better way to put images with links in that side-menu area, I am all ears. It does not necessarily have to "highlight" when you hover, but that would be a nice touch.
Ideally I'd like to add Facebook, Twitter and RSS buttons in the same grungy stamp style, but horizontally. Is that possible to fit all 3 buttons on one horizontal using custom menus as I have done?
Thanks.
Try this:
#menu-item-127 a:hover {
background: url("/wp-content/uploads/2012/09/Grunge-Facebook-Stamp-small-sprite.png") !important;
The !important will override any inherited styles
Text Indenting : Change text-align property in the branding section:
#branding { border: 0 none;
bottom: 0;
padding-top: 5em;
text-align: none;
top: 0; }
Then override the same way:
#menu-item-131 a:hover { background-position: 0 0 !important;
text-indent: -999px !important;}
This is only for a:hover if you need the normal state to be affected as well you have to use in-line styling ( not the best practice but in this case will solve the problem) :
<li id="menu-item-131" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-131" style="text-indent:-999px"> fb </li>
Third problem of hover activation area being too large:
#menu-item-131 a{ background-position: 0 0 !important;
text-indent: -999px !important;
width:75px !important; }

Resources