NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: walter.dasilva on November 13, 2015, 10:34:59 AM
-
How to set a default background image for entire application?
Thanks
-
Walter,
You can add the following code to your own custom.css file (create one if you don't have one already). You can override or - as in this example - add properties to the nt-body class which is the one being used by the templates. By doing it this way you can update NT in the future while preserving your changes/additions.
.nt-body {
background-image: url("/images/yourbackground.png");
}
Peter
-
Hi Peter,
Thanks for you answer.
I want my customer could change de background-image. I have a customer setup table that allow my customers upload the image in order to use it as background-image. So, when it access the page, passing your ID i want to set the background-image with the image that my customer has uploaded.
I'm already getting other information and using them correctly in PageHeader XHTML, but could not change the background image.
Thanks,
-
Save the file the user uploads into /images/yourbackground.png
Alternativly write JavaScript to change the image. Something like
$("body").css("background-image","whatever.png");
which can be added to a page (maybe the header) as
p_web.Script(' $("body").css("background-image","whatever.png");')
Cheers
Bruce
-
Hi Bruce,
I tried lots of embed point and no one works.
So i tried this and its working fine.
<style type=text/css>
.nt-body {
background-image: url("<!-- Net:s:global_bgimage -->");
</style>
XTHML of PageHeaderTag
Thanks
-
Clarion 10
Nettalk 8.68
Got the background working but decided for now to turn it off.
Have tried everything I can think of including deleteing the custom.css file and it won't go away.
Deleted the image itself and that worked but ....
Brian.
-
probably you just need to re-run Gzipall.bat
you can use Firebug to inspect where the CSS is comming from. I'm expecting from all.css, which is created by Gzipall.bat.
cheers
Bruce