I am currently working on creating a table that needs to be larger than the body and centered. Let me provide some more information.
Below is my simplified HTML code :
<body>
<div id="one">
<div>
<table></table>
</div>
</div>
</body>
The table starts off empty, but I use JavaScript to populate it. However, even after filling in the data, the table should exceed the width and height of the body while remaining center-aligned. This means that parts of the table should extend beyond the screen on each side.
Initially, I attempted to achieve this using:
#one {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
However, I encountered an issue where the table couldn't exceed 50% of the body's width (height was not a problem).
I have tried various solutions, but I keep running into problems with ensuring the table's width extends beyond the window size. I'm unsure of what steps to take next. Feel free to ask if you need further details about my code or objectives.