How to include 3 columns under one column in html

Issue

How to include 3 columns under one column in html:

enter image description here
Im using table in my code, hope u understand this.thans a lot
[It looks like your post is mostly code; please add some more details.] – this error is annoying when posting a code, thats why i don’t send codes.

i dont no waht to say more.

<form action="codeadd.php" method="POST" class="content">
    <table class="btn-secondary">
        <tr>
            <td>
                <div class="mb-3">
                    <label>Date Inquiry</label>
                        <input type="date" name="date_inquiry"  class="form-control" />
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Date Responded</label>
                        <input type="date" name="date_responded"  class="form-control" />
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Source</label>
                        <input type="text" name="source" class="form-control" />
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Location</label>
                        <input type="text" name="location"  class="form-control" />
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="mb-3">
                    <label>Size Inquiry</label>
                        <input type="textbox" name="size_inquiry"  class="form-control" />
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Category</label>
                        <input class="form-control" name="category" type="text" list="brands" />
                            <datalist id="brands">
                                <option><?php
                                    $query = "SELECT category FROM crs_sizes WHERE category is not 
                                        null";
                                    $stmt = $database->prepare($query);
                                    $stmt->execute();
                                        foreach ($stmt as $row){?></option>
                                            <option><?php echo $row['category']; ?></option><?php 
                                                } ?>
                            </datalist>
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Recepient</label>
                        <input type="text" name="recepient"  class="form-control" />
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Email</label>
                        <input type="text" name="email"  class="form-control" />
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="mb-3">
                    <label>First Name</label>
                        <input type="text" name="firstname"  class="form-control" />
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Middle Name</label>
                        <input type="text" name="middlename"  class="form-control" />
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Last Name</label>
                        <input type="text" name="lastname"  class="form-control" />
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Contact Number</label>
                        <input type="number" name="contact_no" oninput="javascript: if 
                            (this.value.length > this.maxLength) this.value = 
                            this.value.slice(0, this.maxLength);" maxlength="11"  class="form- 
                            control" />
                </div>
            </td>
                                    
        </tr>
        <tr>
            <td>
                <div class="mb-3">
                    <label>Size</label>
                        <select class="form-control" name="size">
                            <option value="" disabled selected></option>
                                <?php
                                $query = "SELECT SIZE FROM SBP";
                                $stmt = $database->prepare($query);
                                $stmt->execute();
                                foreach ($stmt as $row){?>
                                    <option><?php echo $row['SIZE']; ?>
                                    </option>
                                        <?php } ?>
                        </select>
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Brand</label>
                        <input class="form-control" name="brand" type="text" list="brands" />
                            <datalist id="brands">
                                <option><?php
                                    $query = "SELECT brand FROM crs_sizes WHERE brand is not 
                                    null";
                                    $stmt = $database->prepare($query);
                                    $stmt->execute();
                                    foreach ($stmt as $row){?></option>
                                        <option><?php echo $row['brand']; ?></option><?php } 
                                        ?>
                            </datalist>
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Size</label>
                        <select class="form-control" name="pattern">
                            <option value="" disabled selected></option>
                                <?php
                                $query = "SELECT PATTERN FROM SBP";
                                $stmt = $database->prepare($query);
                                $stmt->execute();
                                foreach ($stmt as $row){?>
                                    <option><?php echo $row['PATTERN']; ?></option>
                                        <?php } ?>
                        </select>
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Description</label>
                        <input type="text" name="description"  class="form-control" required />
                </div>
            </td>                      
        </tr>
        <tr>
            <td>
                <div class="mb-3">
                    <label>Customer Response</label>
                        <input type="text" name="customer_response"  class="form-control" />
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Feedback Dealer TSR</label>
                        <input type="text" name="feedback_dealer_tsr"  class="form-control" />
                </div>
            </td>
                                    
            <td>
                <div class="mb-3">
                    <label>Other Concern</label>
                        <input type="text" name="other_concern"  class="form-control" />
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Purchase</label>
                        <input type="text" name="purchased"  class="form-control" />
                </div>
            </td>
        </tr>
        <tr class="col-md-12">
            <td>
                <div class="mb-3">
                    <label>Reccomended Daeler TSR</label>
                        <input type="text" name="recom_dealer_tsr"  class="form-control" 
                            required />
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>Status</label>
                        <input type="text" name="status"  class="form-control" />
                </div>
            </td>
            <td>
                <div class="mb-3">
                    <label>CRS Last Action Taken</label>
                        <input required type="text" name="crs_last_action_taken"  class="form- 
                            control" />
                </div>
            </td>
        </tr>   
    </table>
    <table class="col-md-11">
        <tr>
            <td>
                <div class="mb-3">
                    <button type="submit" name="submit" class="btn btn-primary">Save 
                        Records</button>
                </div>
            </td>
        </tr>
    </table>
                            
</form>

Please refer to my code above. thank you.

Solution

Use

disply:grid

it will allow you to display 3 column under 1 coulmn

Answered By – vatsal mangukiya

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published