Django.fun

Django how to add html style in JavaScript for load more button

I successfully implement load more button but now I can't add my html style in JavaScript. This is my original style before implement load more button. see the screenshot: enter image description here

after implementing load more button. I have style like this. see the screenshot below:

enter image description here

How to implement my first style for individually showing each blog.

here is my JavaScript for showing html:

 postsBox.innerHTML += `<div class="card mb-4" style="max-width:700px";>
                                               
                                                ${post.title}
                                                <br>
                                                ${post.body}
                                            </div>

`

my .html page:

<div id="posts-box"></div>
            <div id="spinner-box" class="not-visible">
                <div class="spinner-border text-primary" role="status"></div>
            </div>
            <div id="loading-box">
                <button class="btn btn-primary" id="load-btn">Load more</button>
</div>

Answers: 0