Need help? Check out our Support site, then


Bolding text inserted via :before

  1. What I want div.under_work:
    <div class="under_work">Notice: Currently Under Construction</div>
    <div class="under_work"> <em>Currently Under Construction</em></div>

    My current markup for this "template":
    <div class="under_work"><strong>Notice: </strong> <em>Currently Under Construction</em></div>

    From a commented-out portion of my CSS:

    div.under_work p:before {
    	content:"Notice: "
    }

    When I tried adding markup to the content part, it simply ignored the markup and put the text in without any changes. Also, when I used :before, I got a new "Notice": before the original "Notice:" text, but it wasn't bold, either.

    How do I add a bold "Notice:" without emphasis on it, and without bolding the other text in the div?

    The blog I need help with is michaelbishop852.wordpress.com.

  2. EDIT: What I want [to change with] div.under_work [in CSS]:

  3. It looks like you may have gotten this straightened out. If not, can you try explaining it a little more? I'm not seeing why you need the :before when you can just code it and copy/paste into pages under construction.

  4. Good point, but I want to be able to change it from one place, like in Wikipedia templates.

  5. You remove this from the Text editor:
    <strong>Notice: </strong>
    and you turn this:

    div.under_work strong {
    font-size: 24px;
    word-spacing: 2px;
    }

    to this:

    div.under_work:before {
    Content: "Notice: "
    font-size: 24px;
    font-weight: bold;
    word-spacing: 2px;
    }
  6. Thanks. :)

  7. You're welcome!

Topic Closed

This topic has been closed to new replies.

About this Topic