Is it possible, without adjusting the markup and using either CSS Grid or Flexbox, to achieve the following layout?
+-------------------------+
|| || ||
|+-+ +-----------+|
| |
| |
| |
+-------------------------+
There are two items in the row, the first aligned left, the second aligned to the center of the page and filling the remaining width to the right. I have tried various ways, such as an empty 3rd grid item with no width etc, but with no luck. This was my last attempt and shows the issue well.
header {
display: grid;
grid-template-columns: auto auto;
justify-items: stretch;
}
ul {
display: flex;
}
li:last-child {
margin-left: auto;
}
/* for demo only */
ul {
padding: 0;
margin: 0;
list-style: none;
}
li {
padding: 5px;
background: #aaa;
}
p {
text-align: center;
}
<header>
<span>Title</span>
<nav>
<ul>
<li>Link 1</li>
<li>Link 2</li>
<li>Link 3</li>
</ul>
</nav>
</header>
<p>| true center |</p>