David
Nuker Posts:17
|
05/20/2008 1:30 PM |
|
Hi, My graphic designers want to use a different background image on each page of a site (see attachments) Other than the background image, the page layouts, menus etc are identical across all pages. It seems like overkill to create a separate skin for each page. I am thinking there must be a way of using CSS to achieve this. i.e. all the pages use the same skin and I just have to assign different CSS files to each page. |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
05/20/2008 8:52 PM |
|
No, I wouldn't do it with skins, but I'd make that part of the page content. Just as you have different content on each page, you will have different images. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Lee Sykes DNN Creative Staff
Nuke Master VI Posts:4945
|
|
pabacon
Nuke Newbie Posts:1
|
08/07/2009 6:03 AM |
|
I know this is an old thread but I recently ran into the same problem and found this when looking for an answer. I eventually solved this issue by simply overriding my default image in Page Settings>Advanced Settings>Page Header Tags using a < style > block. In an ideal world we'd assign a class name to the body tag so that this kind of thing can remain contained within the stylesheet but this is as good a workaround as is available.< / body >< /html >< / style > |
|
|
|
|
alishakool
Nuke Newbie Posts:5
|
01/07/2010 7:25 AM |
|
Hi I just want to add a different background image for every page of my dnn website. In page settings there is only option to upload icons. If i put the background image in the skin.css file then for every page i cannot afford to use a different skin(as new skin folders will take space) since my web hosting space is limited. Can anyone tell me what code should i change to dispay a different backround image in every page of my website? Please explain in detail .. Awaiting your suggestion asap. Thanks, Alisha Web Application Engineer, |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
01/07/2010 2:29 PM |
|
John Mitchell's blog has a solution for this question. Take a look here. IMHO, it's a clever solution! |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
alishakool
Nuke Newbie Posts:5
|
01/07/2010 11:18 PM |
|
Thanks for the reply With the refernce John Mitchell's blog, I changed little bit and its also wroking gr8. |
|
|
|
Joseph Craig DNN MVP Posts:11667
|
02/01/2011 3:45 PM |
|
There is something oddly satisfying about Googling for the answer to a design issue that I'm having and finding that I found the answer slightly over a year ago!
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Faisal
Nuke Newbie Posts:8
|
10/08/2014 3:29 AM |
|
I am facing the same problem and this particular blog site which you have recomended is not available anymore.. can anyone please help me in this regard??? |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
10/08/2014 8:30 AM |
|
Here is one approach. For the element that you want to hold the background image, add a CSS class like this:
<%=PortalSettings.ActiveTab.TabName %>-background
When the page is rendered, you will have something like
home-background
Then in your CSS file, you can add classes for each page
.home-background{
background-image:url(/Portals/0/background-images/home-background-image.jpg);
}
Create one class for each page name. Since the background images are part of the portal and not part of the skin, it would make sense to put those special classes in the portal.css file. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Faisal
Nuke Newbie Posts:8
|
10/08/2014 10:52 PM |
|
Thank you Mr. Joseph, I have tried the same code but it is not displaying the image. I am pasting here the full code: this is he code I have used in my skinname.ascx file div class="Page<%=PortalSettings.ActiveTab.TabID %>" > which for that partisular page reutrned me Page151 then I have used this particular code in my portal.css .Page151 { background-image: url('portals/0/images/whyus.jpg') ; } and it is not showing me the background image.. the url which I am using is fine there is no issues with the url.. i would really appricate if you can guide me to the solution thanks |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
10/09/2014 9:01 AM |
|
The URL should be /Portals/)/... (Relative to the installation root. Without the /, it's looking elsewhere for the image) This is a good place to recommend learning to use your favorite browser's developer tools. You can look at the actual CSS and HTML that is generated, and you can look at the actual URLs, so you can see much more easily what might be going wrong.
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Bliss It
Nuke Newbie Posts:1
|
11/23/2016 3:56 AM |
|
Hi , i am new into dotnetnuke ,I have build a website and i want to change the header background image dynamically , is there any way it will change from admin end . I have done this with Css, but i want to do this with front end i mean admin panel , i want to select header background image for each page . kindly guide me, this is really really important for me .
|
|
|
|
|