Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Background pictureBackground picture
Previous
 
Next
New Post
5/27/2010 4:43 AM
 
Hi

Another HTML/CSS question while I'm learning...

My topic is to add a picture as a background, f.e. in a HTML/Text module. It has to be 100% (that's no problem) and I should be able to add test over the picture as I can do over a background color. I tried it using a table with only one cell and set the picture as table background. Then I went to the source code of the table but I was not able getting text over the picture. The code looks like
---
<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
    <tbody>
        <tr>
            <td><img alt="" width="1000" height="500" src="/Portals/1/Prospekt breit.jpg" /> Hello</td>
        </tr>
    </tbody>
</table>
---
Can I add the code here? I guess I have to do that in the CSS Editor, right? If so I still don't know how to do that for only one module. And of course I don't know the code by now, but I'll find that out. It would help to know where to add the code.

Thanks!

Regards,
Freddie

 
New Post
5/27/2010 10:20 AM
 
Try the following:
---
<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
    <tbody>
        <tr>
            <td style="backround:url(/Portals/1/Prospekt breit.jpg); width:1000px; height:500px;" > Hello</td>
        </tr>
    </tbody>
</table>
---
or with a div:

---
<div style="background:url(/Portals/1/Prospekt breit.jpg); width:1000px; height:500px;">Hello</div>


Ralph Williams, Jr.
UX Designer / Front-End Web Developer
www.RalphWilliams.com
Ralph Williams Consulting
Twitter: twitter.com/ralphwilliams

Professional DNN7: Open Source .NET CMS Platform
 
New Post
5/27/2010 10:23 AM
 

Freddie,

There are several ways to add a background image to an element:

1. Inline style - You can add the background css to any block element like so:

<div style="background:#000 url(images/images.png) scroll repeat top left">This is the content of the element</div>

2. Using an ID or class on the element - By adding a CSS class or ID to an element you can then use an external stylesheet to control the background:

HTML
<div class="elementclass">This is the content of the element</div>

CSS
.elementclass{
background:#000 url(images/image.png) scroll repeat top left;
}

Regards,

Rick.



PSDtoDNN - You supply the artwork... we'll build the skins!™
Website | Twitter | YouTube | Skype
 
New Post
5/27/2010 2:38 PM
 
Ralph

Thanks for the tip.

I tried both and I see the text finally!
 
nfortunately my background image dissapeared, see my testpage
http://www.eguina.ch/TestHintergrund/...

In edit mode I see the background of the page container (yellow, like in the testmodule below called "Willkommen").
The path of the picture is correct. What the h.. did I do wrong now?

Thanls again & regards,
Freddie 
 
New Post
5/27/2010 2:51 PM
 
Rick

I do not understand no. 2 yet (ID or class element).

I'll try no. 1 (inline style), HTML and CSS tomorrow and post it here.
But before I'll wait for an answer of Ralph; I think he's solution is similar to your HTML one... ?

Regards,
Freddie
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Background pictureBackground picture


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out