[Resolved] how to use background colors for different elements

Home Forums Support [Resolved] how to use background colors for different elements

Home Forums Support how to use background colors for different elements

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #666752
    Immi

    hello there,
    How To Use Specify the background color in a post without spacing I have applied below code, but the problem is some gap with white color. I want to fill only by one color like this http://www.screencast.com/t/wYFqn9bw

    h5 {
    background-color: #f2f2f2;

    }

    #666958
    Leo
    Staff
    Customer Support

    Hi there,

    Is there a specific section I should be looking at?

    I’m not see the content in your screenshot on your page.

    But two options for applying CSS to certain page:

    1) Use Tom’s Simple CSS plugin so it gives you a CSS metabox for each page.

    2) Do something like this:

    .page-id-xx h5 {
        color: #fff;
    }

    Let me know if this helps 🙂

    #667008
    Immi

    hello Leo,

    I want to highlight some points in the post by a background color without spacing.

    h5 {
    background-color: #f2f2f2;

    }

    #667231
    David
    Staff
    Customer Support

    Hi there,

    you’re gonna need to put some markup around it:

    HTML

    <div class="important-box">
        My content here
    </div>

    CSS

    .important-box {
        background-color: #f2f2f2;
    }
    #667681
    Immi

    Hello there,

    I want to change the exact content background color/ box in some specific paragraph

    like this:- **

    #667687
    Leo
    Staff
    Customer Support

    David’s reply above should do exactly that.

    Have you tried it?

    #667693
    Immi

    Yes, I have tried it. when putting HTML code error indicate can you please provide CSS code for this

    #667694
    Leo
    Staff
    Customer Support

    David has provided both HTML and CSS and there are no errors in them.

    Can you link me to the page where you’ve added this?

    #667698
    Immi

    Yes Please have a look **

    #667703
    Leo
    Staff
    Customer Support

    That’s HTML and not PHP as David indicated above.

    #667731
    Immi

    can you tell me where to put this code exactly?

    <div class="important-box">
        My content here
    </div>
    #667746
    Leo
    Staff
    Customer Support
    #667749
    Immi

    Thank you

    #667761
    Leo
    Staff
    Customer Support

    No problem 🙂

    #943918
    Immi

    hello David Sir,
    if I want to put another markup with the different background colour/Style so how to put another CSS for secondary markup.

    I’m trying to achieve like following, but unfortunately, it’s not working.

    .important-box (2){
    padding: 20px 10px;
    border-radius: 10px;
    line-height:40px;
    color: z black
    box-shadow: .0em 05em 12em .01em #eee;
    background: white;
    }

Viewing 15 posts - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.