Jump to content


Photo
* * * * * 1 votes

Custom Background And Font Color In Content Box

content box font color background

  • Please log in to reply
11 replies to this topic

#1 stefanoferruggiara

stefanoferruggiara

    Advocate

  • Members
  • 564 posts
  • LocationVerbania (VB) - Italy
  • Country: Country Flag

Posted 10 December 2012 - 05:16 PM

Hi there,

i'm looking for change the background and font color of the Content Box.

I try with Firebug but.. nothing work .. i'm only able to change all the content background color or all the font color but what i'm searching is change the background and the font color only in the content box section. 

My content box is in the more footer section but in the more footer section i have the secondary menu that i would like dont change (now is with black background and different color for effect)

Anyone can suggest me the right css code?

Thanks for fast reply



#2 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 10 December 2012 - 06:15 PM

What custom CSS have you tried using?



#3 stefanoferruggiara

stefanoferruggiara

    Advocate

  • Members
  • 564 posts
  • LocationVerbania (VB) - Italy
  • Country: Country Flag

Posted 10 December 2012 - 06:38 PM

Catrina i just found now the right code for the background in content box but not for change the font color in the same section.

 

 

#contentbox {
        background: #bcbcbc;
}


#4 stefanoferruggiara

stefanoferruggiara

    Advocate

  • Members
  • 564 posts
  • LocationVerbania (VB) - Italy
  • Country: Country Flag

Posted 10 December 2012 - 06:39 PM

The problem is that this change the color in all the content box and i would like that this change one in the content box of a specific page.



#5 stefanoferruggiara

stefanoferruggiara

    Advocate

  • Members
  • 564 posts
  • LocationVerbania (VB) - Italy
  • Country: Country Flag

Posted 10 December 2012 - 06:43 PM

If the content box is in a side bar o other template part .. what i would like is understand how set.. the coloro of font and background of a specific content box.. for example in the page or post id=1774 etc...



#6 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 10 December 2012 - 06:54 PM

You need to use the page id found in the body tag on the page. For example, if you inspect the body tag with Firebug, you should see a number in it that looks like this: page-id-#. You use that in the body class selector in the CSS like this:

 

Please Login or Register to see this Hidden Content

 

 (replace # with the ID number on the page)


  • stefanoferruggiara likes this

#7 stefanoferruggiara

stefanoferruggiara

    Advocate

  • Members
  • 564 posts
  • LocationVerbania (VB) - Italy
  • Country: Country Flag

Posted 10 December 2012 - 11:24 PM

Please Catrina you can be more specify showing me the complete code (with content box section)?



#8 stefanoferruggiara

stefanoferruggiara

    Advocate

  • Members
  • 564 posts
  • LocationVerbania (VB) - Italy
  • Country: Country Flag

Posted 10 December 2012 - 11:28 PM

I know how use with id but not when referring to specific section as a content box in a specific page.



#9 batman

batman

    Bat Learning

  • Members

  • 1987 posts
  • LocationBuenos Aires, Argentina
  • Framework Version:DMS
  • Country: Country Flag

Posted 10 December 2012 - 11:32 PM

Hi Stefano

 

Catrina said .page-id-XXXX

 

Something like

Please Login or Register to see this Hidden Content

 #contentbox { background: #bcbcbc;}

 

If you also wish to know how I find the page ID, all you need to do is load up FireBug or Google Chromes web dev tool and inspect your page html, at the top you should see body which has a number of classes assigned to it, one of these is page-id-XX (replace XX with your pages id value. I have added a danny┬┤s screenshot to assist you.

 

Please Login or Register to see this Hidden Content


  • stefanoferruggiara likes this

#10 stefanoferruggiara

stefanoferruggiara

    Advocate

  • Members
  • 564 posts
  • LocationVerbania (VB) - Italy
  • Country: Country Flag

Posted 10 December 2012 - 11:41 PM

Thanks my friend .. please you can add to this code also the css for change the font color please?



#11 batman

batman

    Bat Learning

  • Members

  • 1987 posts
  • LocationBuenos Aires, Argentina
  • Framework Version:DMS
  • Country: Country Flag

Posted 11 December 2012 - 09:59 AM

Hi again

You can try with

.fboxtext { color: red;}



#12 Danny

Danny

    Is Awesome!

  • Moderators
  • 15047 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 11 December 2012 - 11:02 AM

When creating custom CSS, do not use the ID for the section, each section comes with its own unique class(es).

 

For example:

 

.section-features

 

Use this instead of the ID, as ID's can over power all other custom CSS, which is not ideal, especially if this site is for a client. As for the font color, try using color: in your code or maybe targeting a, p etc... in your code.







Also tagged with one or more of these keywords: content box, font color, background