Table caption improperly placed
Categories
(Core :: Layout: Tables, defect)
Tracking
()
People
(Reporter: asa.rand, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0
Steps to reproduce:
I have put the page in question on my website: https://wayneca.neocities.org/Basic09/VariableList.html
The caption is being placed inside the table as the first cell of the first row.
It happens when using THEAD and TBODY inside the table.
The table is also a scrollable table.
If you look at the webpage, scroll down to the third table and you will see it.
If you look at the source you can see what I tried to get it to work.
Actual results:
Caption inside table instead of outside table, text wrapped as being inside the first cell of the first row (even though CAPTION is before the THEAD tag).
I used CSS to make the caption not wrap.
Expected results:
Caption should be outside the table, top,left and not wrapped, not inside the table and wrapped.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Tables' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
This is because display: block; rule applied on the <table>, which overrides the default display: table; rule.
Removing the display: block; rule should fix the <caption> behavior.
Thank you. This fixed the issue. I run into this sort of issue because it seems I have to constantly find different ways to make a scrollable table work. This means that I never know what CSS I will have to use to make it work. In this instance, display: block; was not necessary.
Description
•