Yes, you can use overflow
, float
and white-space
.
HTML:
<div class="breadcrumb-container">
<div class="breadcrumb">
Start aaaa aaaa End
</div>
</div>
<div class="breadcrumb-container">
<div class="breadcrumb">
Start aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa End
</div>
</div>
CSS:
.breadcrumb-container {
float:left; max-width:100%; margin:5px; overflow-x:hidden; background:orange;
}
.breadcrumb {
float:right; margin:5px; white-space:nowrap; background:cyan;
}
This will force the links to stay on a single line and hide any overflowing text off the left hand side, so the last categories are visible. The float:left
stops the breadcrumbs from starting from the right margin.