Then I thought that the problem might be that blog post author would probably use post titles of different lengths (one word, two words or more…) and that would look out of proportion (see red border in screeshot below)
I was thinking of may be doing some like flex: 1 1 0; on a flex parent but not sure if its a good idea in this case. Maybe I can try drop post title on the next line so it sits right under “Previous” and “Next” and then somehow make flex children nav-previous and nav-nextoccupy 50/50 of the container?
I see your screenshot is for a smartphone 375 pixels wide (that’s CSS pixels). It is said that smartphones can be as narrow as 320 pixels wide. Also it seems likely that some post titles will be much longer than the examples in your screenshot. Your title to this thread is a good example!
I therefore suggest you consider a layout such as this, at least for small smartphones:
Note the use of text-overflow: ellipsis to cope with long post titles.
There was colon symbols (: ) after Next and Previous words hard coded in PHP template. I removed those. But now I need to figure out how to get those colon symbols back for desktop view. Do I again use something like pseudo-element?
I find the arrows in the main Unicode block of arrows to appear very thin although I now see there are ‘better’ arrows in the Supplemental Arrows C Unicode block (for example 🡲 ):
Because the arrows in the main block of arrows appear thin, for the text in my screenshot in Post#2 I used the 'Black right-pointing triangle and ‘Black left-pointing triangle’ from the Unicode geometric shapes:
Confusingly “black” refers to the shapes having solid fill, they are not outline shapes. You can make the shapes any colour by CSS.
You can simply copy and paste symbol characters. However you should check whether the font supports the symbols. Perhaps someone else on this forum would like comment on how well supported these symbols are on Mac computers and smartphones.
Thanks for the tip @Archibald - everything appears to be working as expected.
There’s one more thing I forgot to ask. WordPress PHP template spits the following HTML for post navigation links where 2 spans .nav-subtitle and .nav-title are wrapped in an HTML anchor element. I am not sure if this is semantically correct HTML. I guess since both a and span are inline elements it is a valid markup. I came across one example in the past where anchor was wrapped around a paragraph of text and that was considered a valid HTML …