How to make a module background image that covers the screen

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 Oct 26, 2015 7:52 pm
Reply with quote
Report this post
http://wecare.bz/index.php/our-service

If you scroll down you will see an image that floats in the middle of the screen. I want to make the entire module that image, IE no space at the top or bottom or sides...

How do I make this possible?
User avatar
Junior Boarder

teitbite
Tue Oct 27, 2015 4:10 pm
Reply with quote
Report this post
Hi

Try add this to override.css file

Code: Select all
#gkBottom2 {
background: transparent url("http://wecare.bz/images/woods.png") no-repeat scroll center center / cover ;
}
User avatar
Moderator

GK User
Tue Oct 27, 2015 5:29 pm
Reply with quote
Report this post
That would change the background of all gkbottom2 across every page
Lets say I only want GKBottom2 on page X?
User avatar
Junior Boarder

teitbite
Thu Oct 29, 2015 8:12 pm
Reply with quote
Report this post
Hi

In this case best is to use page class suffix. Let say You will called this page class suffix "page_x" so code will be like:

Code: Select all
.page_x #gkBottom2 {
background: transparent url("http://wecare.bz/images/woods.png") no-repeat scroll center center / cover ;
}


Here is a link to example how to manage this suffixes with our templates: https://www.gavick.com/documentation/jo ... omla-pages
User avatar
Moderator

GK User
Sat Oct 31, 2015 4:51 pm
Reply with quote
Report this post
okay nearly there, I tried adding a new page suffix to what I currently have "120= imageBg" but each time i do, the main background image disappears.

How do I add a new suffix to this?
User avatar
Junior Boarder

teitbite
Wed Nov 04, 2015 11:44 am
Reply with quote
Report this post
If You have a suffix attached to this page already than add both at the same time:

Code: Select all
120= imageBg page_x
User avatar
Moderator

GK User
Thu Nov 05, 2015 6:59 pm
Reply with quote
Report this post
Sorry I mean i want to do this for Page 120 and lets say another one for page 131
User avatar
Junior Boarder

teitbite
Sat Nov 07, 2015 10:37 am
Reply with quote
Report this post
Hi

Than You just need to add 2 separate rules, one for 120 and other for 131

Code: Select all
120= imageBg page_x
131= imageBg page_x
User avatar
Moderator

GK User
Sat Nov 07, 2015 1:39 pm
Reply with quote
Report this post
Okay great, this works absolutely fine on all the Bottoms however the code doesnt seem to work on Top or Mainbody...I will leave my site with the error so you can see

http://wecare.bz/index.php/our-services
Check here...
And the relevant code is...
.page_x #gkMainbody {
background: transparent url("http://wecare.bz/images/woods.png") no-repeat scroll center center / cover ;
background-size: cover;
}
.page_x #gkBottom3 {
background: transparent url("http://wecare.bz/images/woods.png") no-repeat scroll center center / cover ;
background-size: cover;
}
User avatar
Junior Boarder

teitbite
Thu Nov 12, 2015 1:55 pm
Reply with quote
Report this post
Hi

Please look at the code of Your site. There is no #gkBottom3 there, just #gkBottom2, so You probably need to adjust Your code to point into this layer:

Code: Select all
.page_x #gkBottom3 {
background: transparent url("http://wecare.bz/images/woods.png") no-repeat scroll center center / cover ;
background-size: cover;
}
User avatar
Moderator

GK User
Mon Nov 23, 2015 1:45 pm
Reply with quote
Report this post
got it - working well, ty
User avatar
Junior Boarder

teitbite
Wed Nov 25, 2015 2:14 pm
Reply with quote
Report this post
Hi

Glad I could help.
---
If You were satisfied with our support please let other users know on Twitter: http://twitter.com/gavickpro on Facebook: http://www.facebook.com/gavickpro
User avatar
Moderator


cron