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, ...Container problems with CSS and background-imageContainer problems with CSS and background-image
Previous
 
Next
New Post
7/20/2007 2:28 PM
 

I've been learning all of this as I go over the past week and a half, and I finally have a nice skin and container that I developed with lots of customizability and as little code as possible.  I am having a problem with my container though.  I am trying to create a line underneath the title and headers and above the bottom icons to separate my content from those areas.  I am trying to do it with an centered image and a set height.  I would like the height and centering coded into the CSS file, but I want the image customizable in the html code, so that I can create a number of different containers without needing to do a new container package.  However, everytime I try to do a background-image style in the html code, it disappears altogether.  The same code works perfectly fine in css.  I'll show you:

HTML code as I would like it (I don't care if its in the tr code or the td code, but neither works):

    <tr class="contborder" style="background-image: url(rwbwrborder.png)">
        <td colspan="2"></td>
    </tr>

CSS code as I would like it:

.contborder {
    background-position: center;
    height: 5px;
}

In order to get the image to display, I need to put the background-image code into the CSS, but then it is not easily customizable.  I have tried putting one in there and putting a different one into the html, but it just disappears when I upload it.  It all seems to work fine in frontpage, however.  Any help would be greatly appreciated.  So you have it all to mess with, here is the whole html and css code:

<HTML>
<HEAD>
<LINK ID="container" REL="stylesheet" TYPE="text/css" HREF="container.css" />
</HEAD>
<BODY>
<table class="gencontainer" cellspacing="0" width="100%" style="border-color:#999">
    <tr>
        <td colspan="2" class="contheader" style="background-color:#999; height: 15px;"></td>
    </tr>
    <tr>
        <td colspan="2" class="topbuttons" height="30">[ACTIONS] [VISIBILITY] [TITLE] [ACTIONBUTTON:5]</td>
    </tr>
    <tr class="contborder" style="background-position: center; background-image: url(rwbwrborder.png)">
        <td colspan="2"></td>
    </tr>
    <tr>
        <td colspan="2" id="ContentPane" runat="server"></td>
    </tr>
    <tr class="contborder" style="background-position: center; background-image: url(rwbwrborder.png)">
        <td colspan="2"></td>
    </tr>
    <tr>
        <td class="botleftbuttons">[ACTIONBUTTON:1]</td>
        <td class="botrightbuttons">[ACTIONBUTTON:2] &nbsp;[ACTIONBUTTON:3]&nbsp; [ACTIONBUTTON:4]</td>
    </tr>
</table>
</body>
</html>

 

.gencontainer {
    width: 100%;
    border-width: 2px;
    border-style: solid;
    background-color: transparent;
}
.contheader {
}
.contborder {
    background-position: center;
    height: 5px;
}
.topbuttons {
    text-align: left;
    padding: 4px;
}
.botleftbuttons, .botrightbuttons {
    padding: 5px;
}
.botleftbuttons {
    text-align: left;
}
.botrightbuttons {
    text-align: right;
}

Thank you for your help.

 

Owen

 
New Post
7/23/2007 4:44 PM
 

I dont see why you can not put your background image in css and if you need to put it in html what about

 < tr class="contborder" background="rwbwrborder.png" style="background-position: center">

 

Salar

 
New Post
7/23/2007 6:05 PM
 

I think it will help if you'll replace:

style="background-image: url(rwbwrborder.png)"

with:

style="background-image: url(rwbwrborder.png);"

(e.g. an addition of";" in the end).

 


www.nukedesigners.com W3C compliant Valid skins for dotnetnuke.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Container problems with CSS and background-imageContainer problems with CSS and background-image


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