0

I want to add a new card with text and images, but how can I create such a methoid in javascript, so it would work?

<div class="container-fluid">
            <div class="row">
                <div class="col">
                    <div class="card">
                        <div class="card-user"><h5>User1 posted:</h5></div>
                        <div class="card-header"><h3>Logo.png</h3></div>
                        <img class="card-img-top" src="logo.png">
                        <div class="card-body"><h5>Our first logo</h5></div>
                        <div class="card-footer">6/7/2022 at 6:26PM</div>
                    </div>
                </div>
            </div>
        </div>
<div class="container-fluid">
            <div class="row">
                <div class="col">
                    <div class="card">
                        <div class="card-user"><h5>User1 posted:</h5></div>
                        <div class="card-header"><h3>Logo.png</h3></div>
                        <img class="card-img-top" src="logo.png">
                        <div class="card-body"><h5>Our first logo</h5></div>
                        <div class="card-footer">6/7/2022 at 6:26PM</div>
                    </div>
                </div>
            </div>
        </div>

I want to know if it's possible to add a whole card element with the information the user types, and if it's possible, then how?

Thanks

  • 1
    What have you tried so far? It would mostly be just creating elements and appending them to other elements. – mykaf Jun 07 '22 at 17:16
  • I don't know how to add elements to other sub-elements – TheCreativeMaker Jun 07 '22 at 17:18
  • 3
    SO isn't a coding service; we are here to answer specific questions about coding. You can easily do a web search for "javascript append element". – mykaf Jun 07 '22 at 17:19
  • You might use [Template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) to create cards and insert them into the page. – Yogi Jun 07 '22 at 17:33

0 Answers0