Search code examples
modulebackground-imagedotnetnukeskin

DNN - trying to insert background-image in .DnnModule HTML module, and then give client 3 choices to use as HTML modules


My first problem is that I can't even seem to get a full background image to work for individual modules of type "DnnModule DnnModule-DNN_HTML". Of course I could give them all the same background-image by targeting the DNN_HTML class, but I need to be able to use different background-images on different HTML modules (I need a green, a blue, and a tan). So I need a way to target the HTML modules being used individually? Is there a way to do that? (I am a newb, so please go easy)

Then, the ultimate goal is to have the client able to pick and choose which color module they want to use throughout the site.

Of course I could code an HTML module with the different backgrounds in-line, however, there are various other divs that surround that HTML module, and therefore, the background-image I set in the module using the editor is tiny, and does not cover the whole div.

I'm also not sure if its best to make the client a template with different colored backgrounds they can use already layed out in "bucket" containers for them, but I don't think they could switch the order around could they?

Is there any way at all to accomplish this? Any help would be really really appreciated.


Solution

  • This really would normally be handled by the Container system within DNN.

    I would create 3 different Containers for the colors in question, and then instruct the customer how to choose the Container in the module settings for each of the modules that they want to change the BG for.