Change main image

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
Wed Jun 11, 2014 5:54 pm
Reply with quote
Report this post
Hi

I'm new to Gavick Themes and would like to change the main background image. What is the best and simplest way to do this and be future proof against theme updates.

From what I can gather the image change should be written in the override.CSS file..?

If so, then my question is how do I change the main background image in the override CSS to work with all 3 responsive layouts

I understand how to change the main image on PC layout, e.g.

#gkHeader.nobg {
background: transparent url(www.mysite/images/my big picture.jpg') no-repeat center top;
min-height: 760px;
}

but how do I specify the image for mobile and tablet layout?
User avatar
Fresh Boarder

GK User
Wed Jun 11, 2014 6:25 pm
Reply with quote
Report this post
Hello,

You can use media queries for it i.e.:

Code: Select all
@media (max-width: 1040px) { /* for tablets */
   #gkHeader.nobg {
      background-image: X;
   }
}

@media (max-width: 600px) { /* for smartphones */
   #gkHeader.nobg {
      background-image: X;
   }
}
User avatar
Administrator

GK User
Wed Jun 11, 2014 7:01 pm
Reply with quote
Report this post
Would this be correct?

#gkHeader.nobg {
background: transparent url(http://www.mysite/images/header_bg.jpg') no-repeat center top;
min-height: 760px;
}

@media (max-width: 1280px) { /* for tablets */
#gkHeader.nobg {
background: transparent url(http://www.mysite/images/header_bg_tablet.jpg') no-repeat center top;
min-height: 575px;
}

@media (max-width: 720px) { /* for smartphones */
#gkHeader.nobg {
background: transparent url(http://www.mysite/images/header_bg_mobile.jpg') no-repeat center top;
min-height: 325px;
}
User avatar
Fresh Boarder

GK User
Wed Jun 11, 2014 7:20 pm
Reply with quote
Report this post
It seems to be ok, if the images won't be overrided you can try to add !important.
User avatar
Administrator


cron