Jump to content
Sign in to follow this  
tsalstrand

Contentbox Selector Won't Work? Help please!

Recommended Posts

tsalstrand

Man, this is such a simple fix yet I can't figure out the problem (which really frustrates me)... probably over thinking it and you guys will point out my stupid oversight. 

The website is patdev.us

 

At the top of the home page there is a contentbox that has a link "investors" with a background that spans the browser.  I want that background to only be for the content but can't get it to show when I add .content

 

Right now I have this:

 

#contentbox.container.clone_7 {
  background-color: #c4c4c4 !important;
  background-image: -webkit-linear-gradient(top,#ebebeb,#c4c4c4);
  border-color: #464646;
}

 

That works just fine, but when I add .content after the end of .clone_7, it doesn't display the background.

What am I missing?

 

Thanks!

Share this post


Link to post
Share on other sites
James B

Hi there,

 

I've got it to work using this css, switch your color to suit etc.

 

I'm assuming you mean the content area, not just the background area behind the button etc.

 

 

.contbox-7 {

    background: none repeat scroll 0 0 red;
    float: right;

    width: 100%;
}
 

 

 
But that pushes your button to the left. So
 

 

.contbox-7 .hentry .hentry-pad {

    float: right;
    padding: 0;
}


 

 

 
Hope that's what you meant :-)
 
 

Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
Danny

Hi,

 

Although James suggestion should work. I thought it best to point out that you should use this, to easily style the content area of your ContentBox.

.section-contentbox.clone_7 .content { }

 

However, you have other CSS preventing this from working

 

.content .content-pad {
padding: 0 !important;
}

contbox-7 {
float: right;
}

 

I recommend you review your HTML and CSS, as it is preventing you from correctly styling your content area for your ContentBox section.

  • Like 1

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
tsalstrand

Thanks James and Danny... I went ahead and reviewed/removed the conflicting CSS that was causing global changes.

 

And I was able to definitely implement it with .section-contentbox.clone_7 .content { }

 

However, I am now not able to get the button to float right as I had it before.

I've tried this:

section#contentbox.container.clone_7.section-contentbox {
  float: right;
}

 

I've tried this:

section#contentbox.container.clone_7.section-contentbox .content {
  float: right;
}

 

 

 

 

and I've tried this:

section#contentbox.container.clone_7.section-contentbox .content .content-pad{
  float: right;
}

 

The last one floats it to the right, but removes the background in the process.  There's got to be a conflict, but I can't find it.

Any idea?  Once again, thanks for the help! :-D

Share this post


Link to post
Share on other sites
tsalstrand

Thanks for the try Catrina!  Seems like that should have worked, but it didn't.

 

In the end, it boiled down to simple inline CSS in the form of 

style="text-align:right";

 

Thanks for all the great help!!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×