Is there a way to create a table that is full width on mobile using pure bootstrap classes, but only auto width on desktop?
I attempted to achieve this with the following code:
<table class="table table-bordered w-md-auto w-100 text-start mb-2">
However, the w-100
class has priority with !important, causing it to always display as 100% width instead of auto on desktop view.
I have tried different combinations of w-100
and w-auto
at various breakpoints, but I still can't get it to be 100% wide on mobile and auto on desktop.
Please note that I am unable to use JavaScript or add custom CSS to override the bootstrap settings.