Tagged: x
-
AuthorPosts
-
March 24, 2016 at 7:21 pm #851763
Hi,
I’ve created this div in the topbar to display some text under the navbar that is exposed as the top bar is hidden on scroll
But I can’t get the z index to drop this div under the navbar.
<div class=”banner”>The ultimate fitness and martial arts centre in Moray</div>
With this css in the customizer
.banner {margin: auto;
width: 100%;
padding: 10px;
background: rgb(138, 20, 20);
color: #f2eacb;
position: fixed;
top: 90px;
z-index: -9 !important;
text-align: center;
}@media (max-width: 1000px){
.banner {
display: none;
}
}I suspect this is because its a child of the topbar and is a rule to the z index of the topbar.
How can I change this, or can I place the div somewhere else that will work theme wide?
Thanks,
WP v4.4.2
X child theme v1.0.0
X v4.3.4http://109.169.59.51/~focusfit
Thanks,
Rob
March 24, 2016 at 10:58 pm #851924Hello Rob,
Thanks for writing in! Your site is under construction mode. Would you mind providing us the url of your site with login credentials so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thank you.
March 25, 2016 at 5:35 am #852237Hi Guys,
I’ll just disable the maintenance mode for you because I’ve got clef 2 factor security set up on the login.
Site link is http://109.169.59.51/~focusfit
Cheers!
March 25, 2016 at 6:53 am #852302Hi Mark,
Thanks for the URL!
To show your div behind the navbar, add following CSS under Custom > CSS in the Customizer:
.x-navbar { z-index: 1032; }
Thank you!
March 25, 2016 at 10:52 am #852521Thanks guys,
That worked a treat!
Cheers,
I have another issue though, I’m using this JS to hide email addresses from spam bots;
jQuery(document).ready(function($) {
var $appendmail = $(‘.appendmail’);
if ( $appendmail.length ) {
var username = “info”;
var hostname = “focusfitnesscentre.com”;
var linktext = username + “@” + hostname;
$(“” + linktext + ”
“).appendTo( $appendmail );
}
});and inserting this <span class=”appendmail”></span> into the space where you would normally put a mailto, in my case its in the topbar and a text widget, but neither are displaying?
Do you know why?
Thanks
March 25, 2016 at 4:25 pm #852849Hi There,
Please update your code to;
jQuery(document).ready(function($) { var $appendmail = $('.appendmail'); if ( $appendmail.length ) { var username = "info"; var hostname = "focusfitnesscentre.com"; var linktext = username + "@" + hostname; $($appendmail).html( linktext); } });
Hope it helps, Cheers!
March 25, 2016 at 5:49 pm #852921Perfect, thanks.
I’ve got the old code on another site for a client, will that still work ok?
What has changed to make the old code stop working?
Cheers!
March 25, 2016 at 10:00 pm #853104Hello There,
The old code needs to be updated and also there was an issue with the quotes when you copied and pasted it to your new site.
If you need anything else we can help you with, don’t hesitate to open another thread.Regards.
-
AuthorPosts