• I wanted to put a box around several paragraphs to tie a thought together (actually a note to my father). I used the following:

    .dearDad {
    border: #000 medium solid;
    padding: 10px;
    line-height: 140%;
    margin:auto 100px;
    background-color: #A9CCE3;
    }
    I enter:

    <p class=”dearDad”>Bhah blah

    Bhah blah Bhah blahBhah blah

    Bhah blah Bhah blah Bhah blah

    Bhah blah</p>

    When published, each “Bhah blahBhah blah” becomes a <p> Bhah blah Bhah blah</p>, only the first paragraph has the CSS attached to it!

    I want to box around 5-6 parahraphs.

    HELP!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • If you are using the Classic editor, change your <p class=”dearDad”> and </p> to <div class=”dearDad”> and </div>.

    If you are using the block editor, this is called a Group block, which you can put paragraphs inside. You can find Group and Ungroup on the toolbar, but you may have to select the paragraphs and then add Group. (not sure of the order to do things) You can add a class in the Block sidebar under Advanced.

    By the way, your margin CSS is odd. It says to make the top and bottom auto and the sides 100px. That is a lot, especially on mobile.

Viewing 1 replies (of 1 total)
  • The topic ‘Placing paragraphs inside a box?’ is closed to new replies.