On 2023-04-04 09:55, Robert Prins wrote:
> On 2023-04-03 21:24, Apd wrote:
>> "Ben Bacarisse" wrote:
>>> Robert Prins writes:
>>>> I added a sticky first line to a dump file,
>>>>
>>>> <
https://prino.neocities.org/@temp/dump.html>,
>>>>
>>>> to make it a bit easier to see what's where, but for some reason, the
>>>> background color for the sticky part only extends to what's visible,
>>>> and not the part that scrolls right into view.
>>>>
>>>> Resizing the font and reloading does color the whole top...
>>>>
>>>> What am I doing wrong?
>>>
>>> Add width: fit-content; to the style.
>>
>> That didn't work in Firefox but for some strange reason this did:
>>
>> display: inline;
>>
>> It doesn't mess up the "pre" formatting but he might want to add a
>> margin to the "div".
>
> Actually, the "width: fit-content;" does work in FF (111.0.1 64-bit)
This all works swell, however, I now have two other problems:
1) Ctrl-PgUp no longer works, as the top-of-page is already at the top, and
2) If I use the ":target" pseudo-selector, it does highlight the target, but it
also scrolls it behind the fixed sticky line (unless I'm somewhere at the very
bottom). Tried using two <div>'s to split the <body> added a "top:1" to the
"target" CSS, but that doesn't change anything, so any clues how I can solve
these ones?