How to add a full background image?

Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Fri Jul 11, 2014 10:55 am
Reply with quote
Report this post
Hi,

i tried the solution in the documentation:

html {
background: url(images/background.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}

no effect?!
User avatar
Gold Boarder

GK User
Fri Jul 11, 2014 3:45 pm
Reply with quote
Report this post
Could you please post an url to your site?
Where have you added this code (to which file)?
User avatar
Moderator

GK User
Fri Jul 11, 2014 3:57 pm
Reply with quote
Report this post
i sent you a pm
User avatar
Gold Boarder

GK User
Fri Jul 11, 2014 4:24 pm
Reply with quote
Report this post
1. You code is commented.
2. You are missing "transparent" part of background colour.
3. add bg to body not html:
Code: Select all
body {
 background: transparent url(images/gesunden.png) no-repeat center center fixed;
 -webkit-background-size: cover;
 -moz-background-size: cover;
 -o-background-size: cover;
 background-size: cover;
 }

Yet even with this code, browser expects to find file:
templates/gk_news2/css/images/gesunden.png
and I don't see one there, so you need to use relative path:
http://gesunden.org/images/gesunden.png

So the finished working code looks this way:
Code: Select all
body {
 background: transparent url('http://gesunden.org/images/gesunden.png') no-repeat center center fixed;
 -webkit-background-size: cover;
 -moz-background-size: cover;
 -o-background-size: cover;
 background-size: cover;
 }

but there is still a lot of things to do as background will be seen through opaque elements.
User avatar
Moderator

GK User
Fri Jul 11, 2014 4:57 pm
Reply with quote
Report this post
Hey, you know, I had a similar problem and after several attempts to change the css or html code read somewhere in the documentation of a module on Gavick that helped me get the bg's as I wanted.

Here´s the link http://extensions.joomla.org/extensions/style-a-design/page-background/18213

I'm sure the best way to do that is from code css or html, but this module can serve as a test. I hope it works for you ;)
User avatar
Expert Boarder

GK User
Fri Jul 11, 2014 5:03 pm
Reply with quote
Report this post
hi acropolis,

thank you for the tip. i bought a similar module from herdboy.com but hadnt success already.
i think, because iam no coder i have to give it in professional hands... thanks again:-)
User avatar
Gold Boarder

GK User
Mon Jul 14, 2014 12:01 pm
Reply with quote
Report this post
i have now a plugin for a background image set. but it also works with your css.
now i have to set a white background on the places where the template has no white background.
for some places/classes i could set a white background, but for example in the pic i couldnt find a class that works.
please can you give me the right css code for this areas in the template?

the url i sent you before
User avatar
Gold Boarder

GK User
Mon Jul 14, 2014 7:25 pm
Reply with quote
Report this post
Code: Select all
#gkSidebarLeft, #gkSidebarRight {
background: #fff;
}

Use above code in override.css
User avatar
Moderator

GK User
Mon Jul 14, 2014 7:27 pm
Reply with quote
Report this post
If there is any other element you would like to have white background - please create a screenshot and mark it (right now it looks quite nice, specially with transparent element just above the footer)
User avatar
Moderator

GK User
Mon Jul 14, 2014 9:40 pm
Reply with quote
Report this post
worked:-) thanks
if you have an ideo to optimize the template with transparence or so please let me know...
User avatar
Gold Boarder

GK User
Tue Jul 15, 2014 3:29 pm
Reply with quote
Report this post
If you need to add transparent colour instead of solid one, please read about rgba format:
http://css-tricks.com/rgba-browser-support/
Just keep in mind that it doesn't work in some older browsers so adding a fallback (solid colour) will be nice.
User avatar
Moderator


cron