WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Border/Container around text doesn't work! (3 posts)

  1. frederik_golf
    Member
    Posted 2 years ago #

    Hallo:)

    I have been reading a lot of threads "how to make border/container to text area" and have have tried to do how everybody say it suppose to be done:

    ex:

    1. add this to the css:
    .feature-box {
    background-color: #e3f0f2;
    border: solid 1px #66cccc;
    padding: 10px;
    }

    (I suppose it is the same place as where I edit for exampel the main-container, background, body ect. - and in my place, that is in standard.css)

    2. add this to the post or the page, where you want to add the feature-box:
    <div class="feature-box">
    Some text inside the box.
    </div>

    I have done this, but without any result. It just writes this on my page:
    <div class="feature-box">
    Some text inside the box.
    </div>

    What am I doing wrong? I dont know where exact to drop the text in the css? could that be the problem?

    Thanks

    Frederik

  2. Digital Raindrops
    Member
    Posted 2 years ago #

    On the post or page Editor there are tabs [ Visual ] [ HTML ]

    Change the view to [ HTML ] and write in the HTML content.
    <div class="feature-box">
    <p>Some text inside the box.</p>
    </div>

    Then change the view back to [ Visual ] now you will not see the class code and can edit the text, be careful not to delete any of the class code!

    There are some shortcode plugins out there that will allow you to use shortcodes which can be entered in Visual mode, and are rendered as the page loads.

    A quick look, I have not loaded or tested this plugin, but it looks like it will do what you want and much more!

    EG:
    [red-box]Some text inside the box.[/red-box]

    HTH

    David

  3. frederik_golf
    Member
    Posted 2 years ago #

    thank you so much:D You safed my day;)

Topic Closed

This topic has been closed to new replies.

About this Topic