I'm sorry if this is a duplicate but I've so far been unable to find anything that works.
I have a sticky nav bar with some breadcrumbs etc and under certain circumstances one of the items might have a very long name. This forces the items on the far right to drop down on smaller screens.
I want the really long line section to be able to shrink in cases where it would run into the others, always having the username and "logout" on the same line with the rest. When the long title section is too long, it should truncate and use ellipses.
<div id="topNav" >
<div class="toolBar">
<div class="leftTools">
<div class="">
<span class="icon-group glyphicon"></span>
<a asp-area="" asp-controller="Home" asp-action="index">Base</a>
</div>
<div id="breadcrumb" class="">
<a class="listPageLink" href="">
<span class="icon-carrot-right glyphicon"></span>
<span class="linkText">Type</span>
</a>
<a class="itemPageLink" href="">
<span class="icon-carrot-right glyphicon"></span>
<span class="linkText">stupid really long title for something wow is this name way too long to be useful for anything</span>
</a>
<a class="subCatPageLink" href="">
<span class="icon-carrot-right glyphicon"></span>
<span class="linkText">subcat</span>
</a>
</div>
</div>
<div class="rightTools">
<div class="">
<a>@User.GetName()</a>
@if (User.Identity.IsAuthenticated)
{
<a asp-area="" asp-controller="Home" asp-action="Logout">Logout</a>
}
</div>
</div>
</div>
<div class="fadeBorder"></div>
</div>
What I don't want: I don't want to have to use javascript (if at all possible), just CSS. I don't want to have to write a bunch of media queries for different screen widths. I would rather not use css calc but if that is the only way then that is ok.
How can I accomplish this?
Edit: Here is a jsfiddle of the basic idea. https://jsfiddle.net/1h4maehs/
Edit2: This codepen is a better exaple: http://codepen.io/Nurdyguy/pen/dpdwGb