Skip to content

Fix #6900 - restructure layout of knowl boxes (more idiomatic CSS?)#7019

Merged
edgarcosta merged 2 commits into
LMFDB:mainfrom
havarddj:fix-knowl-width
May 29, 2026
Merged

Fix #6900 - restructure layout of knowl boxes (more idiomatic CSS?)#7019
edgarcosta merged 2 commits into
LMFDB:mainfrom
havarddj:fix-knowl-width

Conversation

@havarddj

@havarddj havarddj commented May 22, 2026

Copy link
Copy Markdown
Contributor

This fixes the layout problem from #6900 on all pages.
TLDR:

Before

Screenshot 2026-05-22 at 17 21 29

After

image

Actually, this is not as simple as tacking on overflow: hidden; to the knowl div, since currently the footer and header (e.g. "permalink" at the bottom) were placed inside the border of the knowl div by specifying the number of pixels to push by. This made setting overflow: hidden create a weird scroll bar.

The fix is to treat the dark gray area as a part of the knowl box itself, not as a border. So I set the border width to 0, colored the existing container div the same color as the border, and then gave the text div the brighter background color (and suitable margins). That way all the elements inside the div box are positioned in a reasonable way, and setting overflow: hidden works as intended.

@havarddj havarddj changed the title Fix #6992 - restructure layout of knowl boxes (more idiomatic CSS?) Fix #6900 - restructure layout of knowl boxes (more idiomatic CSS?) May 22, 2026
@edgarcosta edgarcosta merged commit 74e3635 into LMFDB:main May 29, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants