I would like to create a table like the expected result. Here is my code:
import "./CalendarTable.css";
export default function CalendarTable() {
return (
<div className="calendarTableContainer">
<table className="calendarTable">
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
</table>
</div>
)
}
.calendarTable {
font-size: 13px;
text-align: center;
width: 50%;
margin: auto;
border: 1px solid black;
border-collapse: separate;
border-spacing: 2px;
height: 50%;
}
.calendarTableContainer {
margin: 3px;
width: calc(100% - 6px);
}
Although I have set the border-collapse: separate, the output still does not change.
Expected result:
Actual Result:
The following HTML code can produce what I need.
<html>
<head>
<meta charset="utf-8">
<style>
</style>
</head>
<body>
<table border="1" height="50%" width="50%">
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
</table>
</body>
</html>

