Click here to Skip to main content
14,635,442 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi Team

I have div class = "modal-body", i dont know how to enlarge the size and width of it. I need some help on my logic below mates, thanks.

What I have tried:

<div class="modal-body" width:"75px;">
                           <label for="Text" class="col-sm-2 col-form-label">Add users by</label>
                            <div class="form-group row">
                                <div class="col-sm-4">
                                    @Html.RadioButtonFor(m => m.adminDetails.EmailAddress, "EmailAddress")
                                    <label for="EmailAddress" class="col-form-label">EmailAddress</label>
                                </div>
                                <div class="col-sm-4">
                                    @Html.RadioButtonFor(m => m.adminDetails.LoginID, "LoginID")
                                    <label for="LoginID" class="col-form-label">LoginID</label>
                                </div>

                                <div class="col-sm-4">
                                    @Html.RadioButtonFor(m => m.adminDetails.SIS_ID, "SIS_ID")
                                    <label for="SIS_ID" class="col-form-label">SIS_ID</label>
                                </div>
                            </div>
                        </div>

                    <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                        <button type="button" class="btn btn-primary">Next</button>
                    </div>
Posted
Updated 4 days ago

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

You need to apply the size to the modal-dialog element, as shown in the documentation:
Optional sizes · Modal · Bootstrap v4.5[^]

If you want to set the width inline, you'll need to use the correct syntax for the style attribute, and set the max-width property.
<div class="modal-dialog" style="max-width:75px">
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100