Tagged: x
-
AuthorPosts
-
February 15, 2017 at 7:28 am #1371896
Michael PParticipantHi,
I’m using Autoptimize, which loads javascript as late as possible to avoid render blocking.
This means that Revolution Slider now has a slight delay in loading, so you see the items below it for a second just before the slider loads.
The developer of Autoptimize has suggested adding some CSS to reserve some blank space for the slider, so as to avoid any jumping around. Any idea how I would achieve this?
http://www.wiperstimesplay.co.uk
Many thanks!
February 15, 2017 at 7:54 am #1371932
ChristianModeratorHey Michael,
Try adding the code below in your Appearance > Customize > Custom > Global CSS
.x-slider-container.below { min-height: 500px; }Thanks.
February 15, 2017 at 8:29 am #1371985
Michael PParticipantYes, that worked – many thanks. For some reason it messed up some custom styling I had applied to the footer, but I think I’ve fixed the issue now.
Is there some particular order in which custom CSS should be applied? Changing the order of items was the only way that I could fix the issue with footer styling not being applied.
February 15, 2017 at 7:05 pm #1372803
Rue NelModeratorHello There,
Thanks for updating in!
Please keep in mind that this is the hierarchy of the stylesheets.
– Stack style.cs
– Child theme’s style.css
– Customizer’s custom css
– Cornerstone’s custom cssAnd then for best css practice, please have your custom css like this:
@font-face{ // your font declarations } element { //your styling } #element-id{ // your styling } .element-class{ // your styling } @media(max-width: XXpx){ element{ // your styling } }Hope this helps.
February 17, 2017 at 5:18 am #1374808
Michael PParticipantThanks for the guide – really useful.
I’m re-opening this topic because I just realised that the blank space reserved for Rev Slider is showing up as a lot of excess space that’s visible on smaller mobile devices.
How would I hide this (or even better reduce the space) for iPad portrait and below?
Thanks again!
February 17, 2017 at 8:54 am #1375037
JoaoModeratorHi There,
You will need to play with Revolution Slider Responsive Settings.
I would also consider hiding revolution slider for mobile and tablets and build a section that would be hidden on desktop, laptop and landscape tablets to replace it…
The reason I say that is because your design have a background with is designed with landscap proportions and if strecht to portrait it wouldnt look good.
Hope it helps
Joao
February 17, 2017 at 9:28 am #1375097
Michael PParticipantHi Joao,
I think maybe you misunderstood the request?
At the suggestion of the developer of Autoptimize, I added some custom CSS – just some blank space where Rev Slider loads – in order to hide the delay in loading. Autoptimized JS purposely loads as late as possible to avoid render blocking.
The blank space works great to hide the delay, however this means that the excess space is visible on smaller mobile devices. What I want to do is just add some additional custom css to hide the 700px of blank space on smaller mobile devices (eg iPhone). A media query of some kind I guess, but I couldn’t quite work out what it should be.
Hope that makes sense – many thanks!
February 17, 2017 at 6:44 pm #1375705
RadModeratorHi there,
Please replace this CSS
.x-slider-container.below { min-height: 700px; border: 0; }with this
.x-slider-container.below { border: 0; height: 0px; overflow: hidden; padding-bottom: 70%; }Cheers!
February 19, 2017 at 3:56 am #1376921
Michael PParticipantThanks – does exactly what I need.
February 19, 2017 at 4:51 am #1376949
ThaiModeratorYou’re most welcome 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1371896 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
