table { width: 100%; border-collapse: collapse; } table, th, td { border: 1px solid black; } th, td { padding: 10px; text-align: center; } input[type="checkbox"] { margin-left: auto; margin-right: auto; } th { background-color: black; color: white; } .point-allocation-container { width: 100%; font-family: Arial, sans-serif; } .task-container { width: 100%; display: flex; justify-content: space-between; flex-wrap: nowrap; /* Ensure items don't wrap to the next line */ } .task-item { flex: 1 1 calc(25% - 10px); box-sizing: border-box; margin: 0 5px; padding: 10px; border: 1px solid black; text-align: center; } .task-item1 { flex: 1; /* Equally distribute the space */ box-sizing: border-box; margin: 0 5px; padding: 10px; border: 1px solid black; text-align: center; } .task-item label, .task-item1 label { display: block; margin-bottom: 10px; background-color: black; height: 100px; color: white; padding: 5px; text-align: center; } input[type="number"] { width: 80%; margin-top: 10px; margin: auto; text-align: center; padding: 5px; border: 1px solid black; }