Follow

Does anyone knows if it's possible in html to make a table with a general border=1, that is not a rectangle? If I have a corner cell that's empty, does anyone knows if that can be done without CSS?

· · Web · 11 · 3 · 0

@neauoire a table with 4 tables inside, and one of the inner tables without border? 🤔

@karlicoss myeah this crossed my mind before I asked but I thought maybe there might have been something like <nocell/> or something haha.

@neauoire I would leave the cell blank. no css or html changes needed.

@peregrine Do I need to use nbsp or something for the border to disappear?

firefox latest

@neauoire Sorry little bit of a shitpost but without CSS its a mess of tables, and most people won't think twice about the empty cell.

@neauoire heh little bit of css not going to kill you though. It would work in 99% of cases but not screen readers.

@peregrine yeah it's not really about hating on CSS in this case. I just thought there was a semantic way to say there's no cell here, or something.

@neauoire You'll need to find the mountain hermit who builds the email templates that still work in Outlook and Gmail.

Once in a harvest moon they descend and deliver the arcane knowledge required to make html email templates possible.

@peregrine I bet it's a desert hermit, the people working on this are always living in fucking Nebraska..

@neauoire I wouldn't want to live in a world where I had to be the one studying these symbols.

@neauoire @peregrine I used to have a job that revolved around making email templates. And I live in the middle of ****ing nowhere Iceland, so your stereotype isn't that far off.

@esi @neauoire I did a little bit- of it but it was heavily based on an existing template that I copy pasted from online. And I was just joking :P

@neauoire MAYBE drop the border entirely on the THEAD. But thats not your original ask.

@neauoire with this you can hide the first empty cell and the outer border of the table while retaining the border of the cells with content.
table {
empty-cells: hide;
border: none;
}

@tendigits Ah! first I hear of the empty-cells CSS thing, thanks maybe I can use that somehow

@neauoire sure thing - and sorry I failed to read the last two words of your original post. 😑

@neauoire I don’t think it’s possible without css, but you could try a simple rule like... if cell empty, transparent border and see where that gets you?

@neauoire
It will still be a rectangle, but putting "&nbsp;" without the quotes of course, inside the cell, will make it render as non-visible.

@neauoire I see. When I used this I had no outside border, but borders between cells only. So, I guess as everyone is saying, CSS ...

@neauoire I know the rule `empty-cells: hide` but it is CSS... sorry

@neauoire Tables are evil. Extremely evil. Avoid them, don't even use them for tabular data. Use CSS grid. (Unless you want compatibility with older browsers or you're writing emails, in that case good luck.)

Sign in to participate in the conversation
Merveilles

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.