Navbar update
I decided to tart up the horizontal navigation bar at the top of the page, not that anyone'll notice. I wanted the About
link to be on the right-hand side of the bar.
Those nice people at W3Schools suggest two approaches to a horizontal bar—inline or floating list items—but only one for a right-hand item, {float:right}
. I'm not going to replicate the code here, partly because the outcome was unsatisfactory, but it's on their site.
I used a different method. It’s hardly innovative, but it works. The parent list element is given relative positioning, and the final list item element is given absolute positioning:
ul {
position: relative;
list-style-type: none;
}
li { display: inline; }
li:last-of-type {
position: absolute;
right: 0;
}
It seems to be just as effective as the float method, without any of the weirdness that float can introduce.