div background image copied through to cleared class

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/11/2012 6:15:27 AM
Gravatar
Total Posts 167

div background image copied through to cleared class

I have set a custom CSS class for one of my content sections in a page. I have set a background image for this as

.frontpagemain div
{
background-image: url('images/home-panel.jpg');
background-repeat:no-repeat;
height: 336px;
margin: 0 auto;
padding: 0;}

On displaying the page this image appears twice, this appears to be because the CSS is applied to the outerwrap and the subsequent divs that are created within it as explained in your post  http://www.mojoportal.com/a-more-flexible-set-of-container-panels.

The custom CSS for the background image is also applied to divCleared. I have tried to override this with

.cleared
{
background-image: none;}

But that gets overwritten by the custom Class.

Are there any suggestions on how do I stop divCleared from inheriting the custom class Image

4/11/2012 9:02:27 AM
Gravatar
Total Posts 2239

Re: div background image copied through to cleared class

Hi,

Your selector ".frontpagemain div" is very generic. You should make the selector more specific. The easiest way to do so is to add a class to the divs you want to use the css you've written. So, if you add class="backgroundimage" to the div(s) that should get the image, you would change your selector to ".frontpagemain div.backgroundimage" .

HTH,
Joe

4/11/2012 10:09:07 AM
Gravatar
Total Posts 167

Re: div background image copied through to cleared class

Joe,

Cheers for that, the way I have resolved that is along similar line with

div.frontpagemain .art-postcontent

{background-image: url('images/home-panel.jpg');}

So rather than just a div I place in the content area it refers to the whole content div.

This appears to work both for

.frontpagemain div.art-postcontent

and 

div.frontpagemain .art-postcontent

Cheers for the input. 

 

 

You must sign in to post in the forums. This thread is closed to new posts.