• Maybe I’m just braindead at this hour, but I’m having trouble figuring out a way to use a .css class or id to format recurring text I’m using in posts.
    I want to format text something like this:
    Tweedledee: Now is the time for all good men to come to the aid of their country.
    Tweedledum: The quick brown fox jumped over the lazy dog.
    (I also want to assign a different color to the names, but that’s not enabled on this board.)
    The problem is that the DIV tag apparently isn’t allowed in WordPress posts, and the P tag is inserting an extra line.
    What simple and elegant fix am I missing that will probably occur to me in the middle of the night? 😀
    Thanks for your help.
    DTT

Viewing 6 replies - 1 through 6 (of 6 total)
  • The problem is that the DIV tag apparently isn’t allowed in WordPress posts, and the P tag is inserting an extra line.

    Humm.. I don’t think so. I use DIV in pretty much all of my posts to specify the position of images inside the post. So DIVs ARE allowed and they work well. But DIVs are inserting a blank line also, which obvioulsy is what you don’t like about them.
    As for the colors, Beel’s solution works fine.

    I’ve added a div with an id in js quicktags.

    Thread Starter DevonTT

    (@devontt)

    DIV is inserting the extra line? Hmm. Why would it do that? It doesn’t work that way in straight-up HTML, does it?
    Root, can you explain what you mean and how to use it?
    Thanks for your responses.
    DTT

    Thread Starter DevonTT

    (@devontt)

    OK, I downloaded jsquicktags… Uh, what do I do with it now? (Couldn’t find any instructions in the zip files.)
    Thx.

    Thread Starter DevonTT

    (@devontt)

    Em.. OK, I’m slowly catching on to this.
    I created classes for the two different styles, then used SPAN. For some reason, though, neither BOLD nor STRONG would work, even though the text color was displaying correctly. So I finally just increased the text size by 10%, which gives me the effect I was looking for.

    quicktgs.js is a WP file.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Alternative to DIV in Posts’ is closed to new replies.