-
AuthorPosts
-
March 22, 2018 at 3:00 pm #931351
Hi – I’m getting myself in a tangle! Hope you can help.
I have a layer slider which I want to present above iPad resolution and I have set up a color section with a class .only-mobile to display this for iPad and below.
It sorted out the iPad issue but now I cannot get rid of it on desktop too!
Also, I want to display the hamburger menu on iPad (it works portrait) but I cannot seem to get the numbers right.
So, at the same break point I want the layer slider video to be replaced with the color section image, and the main menu to be replaced by the hamburger – and this should happen at 1024 I think but I can’t seem to get it right.
Could you clever folks take a look please?
The site is not ‘live’ yet – just sitting in a /wordpress subfolder atThanks
Login belowMarch 22, 2018 at 6:08 pm #931512Hey Colin,
I saw your site but it’s not clear what you are trying to achieve?
To hide something on desktop please use the class “mobile-only”
First, enable Custom CSS class name support.
Create your desktop view with all the elements in place.
Below the desktop view element which you want to replace in mobile go ahead and create your element that should be shown in the mobile view.
Hide the desktop view element by using the CSS class name “mobile-only”.
Hide the desktop element in mobile view by using the CSS class name “desktop-only”.
Finally add the custom CSS in Enfold > General Styling > Quick CSS or in your child theme styles:/*---------------------------------------- // CSS // Toggle view //--------------------------------------*/ /* Desktop */ .mobile-only{ display: none; } .desktop-only{ display: block; } /* Mobile */ @media only screen and (max-width: 767px) { .mobile-only{ display: block!important; } .desktop-only{ display: none!important; }}
Let us know if you have any questions.
Best regards,
VinayMarch 22, 2018 at 6:45 pm #931558Hi – I did that, mostly – but the layer slider won’t sit inside a layout element and so I don’t know where to place the custom class.
There are 2 issues currently – removing the layerslider for iPad and below and gettingthe hamburger to show up on the iPad in landscape orientation.
It’s just not switching right.
In Layer Slider > Settings > Mobile I have it set to hide under 1025 – which seems to work OK – but ther custom CSS on the fixed image that replaces it doesb’t hide on desktop view – so I get both the layer slider and the alternative image.
I can make the switch work by using the screen options, but then it won’t show the image on iPad landscape, as it’s 1024 and the screen options is 900px.
I’ve put my complete CSS below as there may be something causing an issue.March 23, 2018 at 7:57 am #931801Hi jonesthelight,
I see you were able to hide the Layer Slider. The code below is to show the burger.
Here is the code you can put in Enfold > General Styling > Quick Css, if it does not work, put into themes/enfold/css/custom.css@media only screen and (min-width: 768px) and (max-width: 1024px){ .responsive #top .av_mobile_menu_tablet .av-main-nav .menu-item-avia-special, .html_header_top .av_bottom_nav_header .av-logo-container .main_menu { display: block; } }
If you need further assistance please let us know.
Best regards,
VictoriaMarch 23, 2018 at 10:23 am #931874Good morning
Thanks – that’s fixed the burger menu and now it’s all fine on tablet and phone.
One last thing I cannot fix is losing the image which replaces the layer slider on desktop.
I was given this CSS:
/*—————————————-
// CSS
// Toggle view
//————————————–*//* Desktop */
.mobile-only{
display: none;
}
.desktop-only{
display: block;
}
/* Mobile */
@media only screen and (max-width: 767px) {
.mobile-only{
display: block!important;
}
.desktop-only{
display: none!important;
}}
I have added the class .mobile-only to the color section holding the image but it displays on desktop size too.
What have I missed?March 23, 2018 at 11:14 pm #932143Hello again
I could really use some help here – the more I fiddle the worse it gets.
Perhaps I can ask to try and fix one thing.
I have a color section with an image and custom class you gave me of .mobile-only
This has the following CSS you gave me:
/*—————————————-
// CSS
// Toggle view
//————————————–*//* Desktop */
.mobile-only{
display: none;
}
.desktop-only{
display: block;
}
/* Mobile */
@media only screen and (max-width: 767px) {
.mobile-only{
display: block!important;
}
.desktop-only{
display: none!important;
}}
——————————————————-
This does not stop it appearing on desktop view above 1024.
Can you help me fix that?March 24, 2018 at 5:26 pm #932397Hi,
That code you added together with Victorias code?
Can you please show us a screenshot of what you want to do and how you want to look so we are able to help properly?Best regards,
BasilisMarch 25, 2018 at 8:03 am #932548I can’t see how to send attachments so I will describe.
On the homepage at http://www.solid-steelband.com/wordpress there is a layer slider below which is an image placed in a color section with custom class which is supposed to hide it above 1024px but it doesn’t.
Also, the burger menu does not show up on iPad landscape – it does on portrait. So I have no menu at all on iPad landscape.
The full CSS is descrived below.
(how do I send attachments?)
—————————————————–
CSS in General Styling:
——————————————————
#top #header_meta .phone-info {font-size:16px; color:black;}
@media only screen and (max-width: 990px) {
.av-main-nav > li > a { padding: 0 5px; }
}
.main_menu ul:first-child > li > a { font-size: 15px; }
#top #wrap_all .av_header_transparency .main_menu ul:first-child > li > a:hover .avia-menu-text{
color: #c3512f !important;
}
.avia-menu-fx {
bottom: 10px;
}@media only screen and (max-width: 1024px) {
#mobile-advanced, #advanced_menu_toggle, #advanced_menu_hide { display: block; }
nav.main_menu { display: none; }}—————————————
CSS in child theme styles.css:
——————————————–
@media only screen and (min-width: 768px) and (max-width: 1024px){
.responsive #top .av_mobile_menu_tablet .av-main-nav .menu-item-avia-special,
.html_header_top .av_bottom_nav_header .av-logo-container .main_menu {
display: block;
}
}
/*—————————————-
// CSS
// Toggle view
//————————————–*//* Desktop */
.mobile-only{
display: none;
}
.desktop-only{
display: block;
}
/* Mobile */
@media only screen and (max-width: 767px) {
.mobile-only{
display: block!important;
}
.desktop-only{
display: none!important;
}}March 26, 2018 at 4:02 pm #933065Hi,
Let us know how that worked for you :)
Best regards,
VictoriaMarch 26, 2018 at 11:58 pm #933245Hi Victoria
That solved that! It was Vinay who gave me that code in the first reply in this thread. I saw it was a class when the theme mentioned an ID. Oh well, should have tried that before. Thank you.
I have one last issue – the code above which makes the burger menu display on the iPad at 1024px or below – it works perfectly with portrait mode but in landscape the burger is on the left on top of the logo which is why I thought it wasn’t there – but now I see it overlapping the logo. How will I restore it to the right side?March 27, 2018 at 9:41 am #933503Hi jonesthelight,
Here is the code you can put in Enfold > General Styling > Quick Css, if it does not work, put into themes/enfold/css/custom.css
@media only screen and (min-width: 768px) and (max-width: 1024px) { .html_header_top #top .av_menu_left .main_menu { left: auto; right: 0px; } }
If you need further assistance please let us know.
Best regards,
VictoriaMarch 27, 2018 at 1:12 pm #933647Thanks Victoria – that’s done it!
One last question – I tried following up on a couple of posts about replacing the ‘burger’ with an image of the word ‘Menu’ which was a request from the client. I didn’t manage to make that work either – is this something that should be simple to do?
Thanks again everyone for helping me.March 27, 2018 at 1:25 pm #933656Hi,
As I understand you like to display the word menu next to the burger menu icon, correct?
Please refer to this link let us know if there is any issue we will be happy to help you :)
Best regards,
VinayMarch 27, 2018 at 1:34 pm #933658Thanks Vinay – that certainly works. I have emailed the client to be sure they are happy – I know I am!
March 28, 2018 at 7:03 am #934027Hi jonesthelight,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.