I want to ensure that the text rows are aligned perfectly with the numbers in the yellow vertical bar, without causing any issues with the mouse pointer as it moves across the rows. Adjusting margin or padding also affects the position of the mouse pointer.
ISSUE: The problem depicted in the image reveals a misalignment between the first and second rows and the numbers in the yellow column. The rows in the black panel occupy the empty spaces among the numbers in the yellow bar.
https://i.sstatic.net/PKKPt.png
HIGHLIGHT.JS: Ideally, I would prefer not to rely on the Highlightjs library for styling the text color in the code snippet. However, my attempts to remove Highlightjs introduced additional CSS that caused more empty space at the top of the black panel. Even when using Highlightjs, the alignment issue persists with an increased empty space.
If you are unfamiliar with Highlightjs, it's straightforward to use and is required to examine the provided solution. Below, you can find the complete working snippet including the Highlightjs CDN link already included in the HTML:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/vs2015.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
DESCRIPTION: Within the .numbers
CSS class, I've adjusted the spacing between numbers using line-height: 1.3
and their size with font-size: 16px
. My goal is to maintain this consistent spacing and size. Although I attempted modifying some paddings
and margins
, they interfered with the mouse pointer behavior. I aim to achieve a layout similar to the following:
https://i.sstatic.net/z1EuV.png
How can I align the rows accurately with the numbers?
NOTE: Pay attention to the disruption in the mouse pointer movement over the rows. The alignment issue may be resolved, but incorrect positioning of the mouse pointer could occur between two rows.
If providing assistance, kindly utilize my specific code instead of offering alternative examples, as my implementation is somewhat unique. Thank you in advance.