I have a panel panel-default
on my page to display some data. I want the panel's min-width
to be 720px, and if the window is resized to less than 720px, I want a horizontal scrollbar to appear. However, the panel cannot shrink below 720px similar to using table-responsive
with tables. This is how I achieve it with tables:
HTML
<div class="example-table table-responsive">
<table id="example-table" class="table table-hover">
</table>
</div>
CSS
.example-table{
max-width: 720px;
}
#example-table{
min-width: 720px;
}
When I tried applying the rule .panel{min-widht:720px;}
, it didn't work.
How can I achieve the same effect with my panel?
EDIT: After testing this on jsfiddle, I found that even when I set min-width: 760px
, the content in the panel-body
(two col-sm-6
) creates two rows instead of staying as two columns. Initially, I thought this was due to min-width
, but now I'm unsure why this happens even with the horizontal scrollbar present.