Header Image On Mobile

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Nov 03, 2014 6:20 pm
Reply with quote
Report this post
Hi

Is it possible to use different header image for desktop and mobile device ?
50% of the image is missing on the mobile device. Please take a look at stinejessie.com
User avatar
Junior Boarder

GK User
Tue Nov 04, 2014 7:07 am
Reply with quote
Report this post
Could you please post an url to your site?
User avatar
Moderator

GK User
Sat Nov 08, 2014 9:07 pm
Reply with quote
Report this post
Cyberek wrote:Could you please post an url to your site?


the url is stinejessie.com
User avatar
Junior Boarder

GK User
Mon Nov 10, 2014 8:39 am
Reply with quote
Report this post
It is possible but not that easy. Instead using image attached to a module you would need to attach image with override.css and then use mesia-queries to load different image for smaller screens.
User avatar
Moderator

GK User
Wed Nov 12, 2014 3:29 pm
Reply with quote
Report this post
Ok , so its not possible to just paste something into override in template settings and use a different image on mobile devices?
User avatar
Junior Boarder

GK User
Wed Nov 12, 2014 8:06 pm
Reply with quote
Report this post
Hmm.. I have an idea:
Please edit: /templates/gk_john/css/override.css and add at its end:
Code: Select all
@media (max-width: 640px) {
    #gkHeader div.custom.gk-header2 {
        background-image: url('/images/headernew2.jpg') !important;
    }
}

Now place upload second image to: http://stinejessie.com/images/headernew2.jpg (same way as you did with headernew.jpg file).
You can adjust 640px value to change "break point" width.
Remember to enable "CSS override" in template settings - advanced section.
User avatar
Moderator

GK User
Fri Nov 14, 2014 12:00 am
Reply with quote
Report this post
Thank you so much =)

If someone else is going to use this, remember to change the image url in the code.
User avatar
Junior Boarder

GK User
Fri Nov 14, 2014 8:11 am
Reply with quote
Report this post
Oh, true, I have forgot to put it in your site context ;).
Is there anything else I can help you with regarding this topic?
User avatar
Moderator

GK User
Wed May 06, 2015 1:05 pm
Reply with quote
Report this post
Cyberek wrote:Hmm.. I have an idea:
Please edit: /templates/gk_john/css/override.css and add at its end:
Code: Select all
@media (max-width: 640px) {
    #gkHeader div.custom.gk-header2 {
        background-image: url('/images/headernew2.jpg') !important;
    }
}

Now place upload second image to: http://stinejessie.com/images/headernew2.jpg (same way as you did with headernew.jpg file).
You can adjust 640px value to change "break point" width.
Remember to enable "CSS override" in template settings - advanced section.


Hi. please take a look at http://www.kasperix.com.

Added the following code (CSS override is enabled):
Code: Select all
    @media (max-width: 640px) {
        #gkHeader div.custom.gk-header2 {
            background-image: url('/images/headers/sdk_header_mobile_580x950.jpg') !important;
        }
    }


Opening the URL with Safari on an iPhone 5 (iOS 8.3) still shows the desktop (large) picture.

Any idea, what I am missing? Thank you.
User avatar
Fresh Boarder

GK User
Wed May 06, 2015 7:28 pm
Reply with quote
Report this post
Could you please disable css compression?
User avatar
Moderator

GK User
Thu Jun 18, 2015 10:30 am
Reply with quote
Report this post
Cyberek wrote:Could you please disable css compression?


Done. Sorry for the late reply. I somehow expected a notification if and when anybody replied to my post. Will check proactively and more frequently from now on.

Thank you.
User avatar
Fresh Boarder

GK User
Sat Jun 20, 2015 4:07 pm
Reply with quote
Report this post
Maybe the css itself is wrong:
Code: Select all
#gkHeader div.custom.gk-header2

there is no such element, perhaps you need:
Code: Select all
#gkHeader div.custom.gk-header1
User avatar
Moderator

GK User
Sun Jun 21, 2015 11:23 am
Reply with quote
Report this post
Ok, that's a bit embarrassing. Thank you for your help!
User avatar
Fresh Boarder

GK User
Mon Jun 22, 2015 8:30 pm
Reply with quote
Report this post
Is there anything else I can help you with regarding this topic?
User avatar
Moderator

GK User
Tue Jun 23, 2015 1:09 pm
Reply with quote
Report this post
no, thank you. much appreciated.
User avatar
Fresh Boarder

GK User
Tue Jun 23, 2015 7:20 pm
Reply with quote
Report this post
Feel free to post new forum threads if you have any other questions.
User avatar
Moderator


cron