- Posts: 8
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
CSS background images not displaying from custom template
- hano
- Topic Author
- Offline
- New Member
Less
More
8 years 2 months ago #131668
by hano
CSS background images not displaying from custom template was created by hano
Hi,
I'm developing a custom template (at upload/templates/tsr) but I can't get images to display as background images in css. The images are located at upload/templates/tsr/images/ and the css at upload/templates/tsr/css/template.css.
When I do this:
The image displays.
When I do this:
with the following in template.css:
It doesn't display. If I navigate to the url it's trying to get the image from I get:
Am I putting the image in the wrong place?
Thanks
I'm developing a custom template (at upload/templates/tsr) but I can't get images to display as background images in css. The images are located at upload/templates/tsr/images/ and the css at upload/templates/tsr/css/template.css.
When I do this:
Code:
<button type="submit" id="movenextbtn" value="movenext" name="movenext" accesskey="n" class="submit imgbtn" style="background-image: url({TEMPLATEURL}images/continuebtn.png">continue</button>
When I do this:
Code:
<button type="submit" id="movenextbtn" value="movenext" name="movenext" accesskey="n" class="submit imgbtn2">continue</button>
with the following in template.css:
Code:
.imgbtn2 { background-image:url(../images/continuebtn.png); }
404 Not found.
Unable to resolve the request "tmp/assets/images/continuebtn.png".
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Am I putting the image in the wrong place?
Thanks
The topic has been locked.
- DenisChenu
- Away
- LimeSurvey Community Team
Less
More
- Posts: 13620
- Thank you received: 2488
8 years 2 months ago - 8 years 2 months ago #131669
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic CSS background images not displaying from custom template
Hi, yes, can confirm the issue.
And cannot be fixed actually.
Please : report the bug in our mantis
PS: assets url is done on complete css file, this must be a global asset url and assets is done with:
assetUrl= template/asset/
css link $asseturl/csslink
And cannot be fixed actually.
myself wrote: Corrected :
Can be fixed with debug=>1
See : github.com/LimeSurvey/LimeSurvey/blob/ma...ents_helper.php#L175
Please : report the bug in our mantis
PS: assets url is done on complete css file, this must be a global asset url and assets is done with:
assetUrl= template/asset/
css link $asseturl/csslink
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 8 years 2 months ago by DenisChenu.
The topic has been locked.
- hano
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 1
8 years 2 months ago - 8 years 2 months ago #131678
by hano
Replied by hano on topic CSS background images not displaying from custom template
Thanks for your reply.
I got it to work by adding this to config.php
I got it to work by adding this to config.php
Last edit: 8 years 2 months ago by hano. Reason: I said my config change didn't work. But that was due to a permissions issue with my config file.
The topic has been locked.
- DenisChenu
- Away
- LimeSurvey Community Team
Less
More
- Posts: 13620
- Thank you received: 2488
8 years 2 months ago - 8 years 2 months ago #131692
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic CSS background images not displaying from custom template
Corrected :
Can be fixed with debug=>1
See : github.com/LimeSurvey/LimeSurvey/blob/ma...ents_helper.php#L175
.............
Hi,
Here : you set the global path for all assets to your template ?
And it work ?
You have a lot of new directory then in your template ?
:ohmy:
Can be fixed with debug=>1
See : github.com/LimeSurvey/LimeSurvey/blob/ma...ents_helper.php#L175
.............
Hi,
Here : you set the global path for all assets to your template ?
And it work ?
You have a lot of new directory then in your template ?
:ohmy:
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 8 years 2 months ago by DenisChenu.
The topic has been locked.
- hano
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 1
8 years 2 months ago #131794
by hano
Replied by hano on topic CSS background images not displaying from custom template
Hi
Yes I set the global path for all assets to my template and it works.
No, I haven't got any extra directories in my template. Only the standard css/, fonts/, images/, scripts/ and views/.
My template is 100% custom, though so I don't need assets from elsewhere.
Yes I set the global path for all assets to my template and it works.
No, I haven't got any extra directories in my template. Only the standard css/, fonts/, images/, scripts/ and views/.
My template is 100% custom, though so I don't need assets from elsewhere.
The topic has been locked.
- DenisChenu
- Away
- LimeSurvey Community Team
Less
More
- Posts: 13620
- Thank you received: 2488
8 years 2 months ago #131797
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic CSS background images not displaying from custom template
Hi,
I corrected my answer : set debug to 1 fix the issue .
There are a bug in LS core here .
I corrected my answer : set debug to 1 fix the issue .
There are a bug in LS core here .
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- DenisChenu
- Away
- LimeSurvey Community Team
Less
More
- Posts: 13620
- Thank you received: 2488
8 years 2 months ago #131841
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic CSS background images not displaying from custom template
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.