I'm looking for a way to style certain <td>
elements in my table to make them appear as text inputs within the cells. In the past, I would add an extra <div>
or <span>
inside the cell and then apply border, margin, and padding styles to achieve the desired look. However, this method is causing performance issues with the third-party grid component I'm using (kendo ui). Therefore, I need to find a way to directly style the cell element itself (<td>
element) without adding any additional elements.
Simply giving a border style to the <td>
element won't suffice because I specifically want these borders to be 3px or 5px thick. Otherwise, it will just blend in with the table borders and not resemble an input field.
Is there a way to apply inline borders like 3px padding to a specific <td>
element without using JavaScript?
Attached is a screenshot of my current setup. I'm aiming for this display without any extra elements inside the cell: