Image background in responsive mode

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
Fri Jan 16, 2015 6:36 pm
Reply with quote
Report this post
Hi,
I finished my website with the template "StartUp", and It works fine, but in my mobile the image in the background remains big.
I replaced the image in ftp >images > header_bg_mobile.jpg
with the new image in the correct size
but it remains always big.
(Same problem with the tablet)

How can I do?

can you help me?
User avatar
Fresh Boarder

teitbite
Sat Jan 17, 2015 6:37 pm
Reply with quote
Report this post
Could you please provide me with a URL to your website, either here or via PM (click the “Private Message” text underneath my avatar) so that I may analyze it? It is a lot easier for us to diagnose issues when we have a live site to examine.
User avatar
Moderator

teitbite
Wed Jan 21, 2015 11:06 am
Reply with quote
Report this post
Hi

I think the only way to do this is by adding this code to override.css (make sure override is enabled in template settings):

Code: Select all
@media only screen and (max-width:767px) {
#gkHeader {
    background: url("../images/header_bg_mobile.jpg") no-repeat scroll center top transparent;
}
}


and move the header_bg_mobile.jpg image to template's /images folder.
User avatar
Moderator

GK User
Wed Jan 21, 2015 5:39 pm
Reply with quote
Report this post
Great! Now is perfect
for mobile.

But for the tablet?

thanks a lot

Giuseppe
User avatar
Fresh Boarder

teitbite
Thu Jan 22, 2015 6:37 pm
Reply with quote
Report this post
Hi

If You need for tablet as well than use this code instead and upload a background for it:

Code: Select all
@media only screen and (max-width:1020px) {
#gkHeader {
    background: url("../images/header_bg_tablet.jpg") no-repeat scroll center top transparent;
}
}
@media only screen and (max-width:767px) {
#gkHeader {
    background: url("../images/header_bg_mobile.jpg") no-repeat scroll center top transparent;
}
}
User avatar
Moderator

GK User
Fri Jan 23, 2015 11:04 am
Reply with quote
Report this post
teitbite wrote:Hi

If You need for tablet as well than use this code instead and upload a background for it:

Code: Select all
@media only screen and (max-width:1020px) {
#gkHeader {
    background: url("../images/header_bg_tablet.jpg") no-repeat scroll center top transparent;
}
}
@media only screen and (max-width:767px) {
#gkHeader {
    background: url("../images/header_bg_mobile.jpg") no-repeat scroll center top transparent;
}
}


NOW IS PERFECT!!
Thanks a lot!!
have a nice day
Giuseppe
User avatar
Fresh Boarder

teitbite
Sun Jan 25, 2015 11:12 am
Reply with quote
Report this post
Hi

No problem. Glad I could help :)
User avatar
Moderator


cron