Skip to content

modal-box sizing #551

Answered by SavarJ
vasilejianu asked this question in Q&A
Mar 6, 2022 · 5 comments · 1 reply
Discussion options

You must be logged in to vote

I faced this exact problem today. By playing around in the dev tools I found out that the label which is inside the main label should have 2 classes max-w-none and whatever width you want like w-full

Example of last modal in DaisyUi: Modal that closes when clicked outside

<!-- The button to open modal -->
<label for="my-modal-4" class="btn modal-button">open modal</label>

<!-- Put this part before </body> tag -->
<input type="checkbox" id="my-modal-4" class="modal-toggle">
<label for="my-modal-4" class="modal cursor-pointer">
  <label class="modal-box relative **max-w-none w-full**" for="">
    <h3 class="text-lg font-bold">Congratulations random Interner user!</h3>
    <p class="py-4">Y…

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by saadeghi
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@smilefl0w
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants