Answer the question
In order to leave comments, you need to log in
Long line bursting container with min-width?
I have a container for which min-width is specified, but width is not specified.
Inside it, the breadcrumbs line comes first, followed by the main content block.
<div class="wrapper">
<ul class="breadcrumbs">
<li>one</li>
<li>two</li>
<li>three</li>
<li>lorem ipsum dolor sit amet</li>
<li>lorem ipsum dolor sit amet</li>
</ul>
<div class="content"></div>
</div>
body { text-align: center; }
.wrapper { display: inline-block; min-width: 400px; text-align: left; border: 1px solid #000; }
.breadcrumbs { background-color: #ddd; list-style: none; margin: 0; padding: 0; }
.breadcrumbs > li { display: inline; }
.breadcrumbs > li:before { content: ' > '; }
.breadcrumbs > li:first-child:before { content: ''; }
.content { width: 400px; height: 100px; background: #aaa; }
.content1 { width: 500px; }
Answer the question
In order to leave comments, you need to log in
You can move .breadcrumbs inside a .content block.
Then .breadcrumbs will have a width no greater than .content, and if this width is exceeded, the content of .breadcrumbs will wrap to the next line. Is that what you meant?!
Now you are trying to make the .wrapper block expandable by the .content block, but not expandable by the .breadcrumbs block.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question