Working with color in wp - can anyone help?

4 replies
  • WEB DESIGN
  • |
I have been banging my head against the wall on this one! What I am trying to do is highlight a section of a page in my wp blog. Not the letters - but a whole paragraph or two have the background color be different or highlighted to stand out from the rest of the page. Can anyone help with this?
#color #working
  • Profile picture of the author Andy Marco
    The easiest way to do this is with a <BLOCKQUOTE> </BLOCKQUOTE> You can style the CSS so that there isn't much of an indent as generally a Blockquote will be indented. I'm afraid you're goinng to have to get down and dirty with the html. I'm not in anyway a programmer or HTML expert but I think this is probably the simplest way to do what you want.

    Good luck anyway.
    {{ DiscussionBoard.errors[1829359].message }}
  • Profile picture of the author Aronya
    What you need to wrestle with is the CSS file for your page. Create a unique class for the text you want to highlight, and then give it the appropriate properties. For example:

    .specialtext {
    background-color: #002f5b;
    }

    Then, you need to include that class name in the tag(s) for the text in question:

    <p class="specialtext">
    or
    <span class="specialtext">

    You can use the blockquote tag, but there is no need, and your CSS file might already have some values set for it. Easier to use <p> or <span> or even <div>. Hope that helps.
    {{ DiscussionBoard.errors[1829822].message }}
    • Profile picture of the author oregongal
      Thank you for the replies. I'm afraid they are still not quite detailed enough for me. If anyone thinks they can explain it in more detail or refer me to where I can find out I'd really appreciate it!
      {{ DiscussionBoard.errors[1830394].message }}
  • Profile picture of the author mywebwork
    Both replies are correct and are essentially saying the same thing - basically you need to define a custom class in your themes style sheet (probably style.css) and then encase the text you want affected within that class using a paragraph, span or div tag.

    I'd advise backing up your style sheet before making attempts to modify it. And although you could do this edit with the built-in WordPress editor I'd recommend editing the file on your local computer with a proper text editor.

    Bill
    {{ DiscussionBoard.errors[1830596].message }}

Trending Topics