this post was submitted on 17 Jun 2025
5 points (100.0% liked)

HTML

379 readers
1 users here now

founded 2 years ago
MODERATORS
 

My site is currently pretty simple, but it still uses enough CSS that some parts of it look really bad in a browser like Links2 that doesn't support CSS. Most of what i'm doing with CSS can be done with plain HTML, it just doesn't look as good.

Is there a way to make a page try to load normally with CSS and whatnot, and then only load a simpler version with everything done in tables if the normal version can't load? Is my best option here to make normal and simple versions of every page?

top 4 comments
sorted by: hot top controversial new old
[–] Boomkop3@reddthat.com 2 points 1 week ago

You could make your html usable without css. You could also test some css manipulaion with javascript. Or load both and hide the unstyled one with css

[–] Deebster 1 points 1 week ago* (last edited 6 days ago)

If you want to have a tables version (the 90s called!) in one page (without serving different versions), then you'd probably have to have that in the page the whole time then override that with CSS, or just have two versions in the page and use CSS to show the correct version (I'm not sure if Links2 supports any CSS like display: none).

[–] lambalicious@lemmy.sdf.org 1 points 1 week ago* (last edited 1 week ago)

EDIT: assuming here that "just make the page simple" is not an option. If the page layout is advanced enough that lacking CSS is a serious instance, you'll need two versions (or a version and an "export") anyway.

An option that I strongly don't recommend but it is doable, is to make the page with tables, then format the tables with display:flex or display:grid and the adequate related properties for the "modernized" view for browsers that support CSS.

Then again, nothing really prevents you from doing things the better way: making two pages and linking from one to the ther with a link like

Click here for a simplified / tabular version

It's even easier to maintain, in particular if you have a good workflow / build system for composing either page from the data you want to show.

[–] brian@programming.dev 1 points 1 week ago

you could look at the user agents and have 2 versions, one for normal browsers and one for Links and similar.

you could also probably do something terrible with having an initial page that supports both, adding a cookie and detecting if the css file gets downloaded, then after that point serving them the css styled if they did or the table styled if not. you could even reload the page with js if it's enabled and you detect the css was downloaded. this hinges on Links and similar not even downloading the css, which I'm not sure if is true.