For instance: https://jsfiddle.net/notayam/4mLzus0y/
I tried setting top-padding and bottom-padding to zero, but even though the box model inspector shows 0 above and below, there is still some blank space as shown in the jsfiddle link. Also, the text is not centered vertically.
Even after adding
vertical-align: middle !important;
, the issue persisted.
Eventually, I managed to center it vertically by experimenting with different values for line-height
, yet the unwanted padding around the text remained.
Looking back at some old code that utilized bootstrap, I noticed a similar scenario that I had somewhat solved before. The older code used display: inline-block
while this one was using block
. I attempted to forcefully apply
display: inline-block !important;
here without success. Despite both my CSS and spectre CSS specifying inline-block
, the element displayed as block
in the inspector, leaving me puzzled about where the discrepancy originated from or why the override failed.
Any guidance on debugging CSS more efficiently would be highly appreciated. My main objective is to efficiently display tabular data in a compact manner, eliminating the need to deal with CSS complexities in the future.
The remainder of the application relies on Python 3/Airium/Bottle, which might be relevant information. It is being run on Firefox 100.0.2 on MacOS 12.1, with only local deployment planned, making support for other browsers irrelevant for now.