I have had this really weird issue with my calendar for a while now. Whenever the months change, the border extends out beyond the calendar’s size. With some months it’s fine though. Is there anything I can do? I added this border cause I did not like the calendar’s original blending in with it, the white background shows up under the border. I didn’t want that.
It’s part of its JS as you can see. So what I am wondering is, how can I make the border auto adjust its height whenever the calendar changes its months, rather than me manually doing so every time?
Why are you giving it a height if the table changes size depending on month displayed? Obviously the table or border will not match. (The table element treats height as min-height and will expand if content makes it taller anyway.)
And why are you still using half pixels when there is no such thing as half a pixel (apart from bleeding edge cases). I have never used a fraction of a pixel in the last 20 years.
That codepen seems to work ok but doesn’t use the code you are talking about unless I misunderstand the reason for posting it
Without seeing the full demo it’s hard to say but you don’t need a height to wrap a border around an element (assuming there are no margins on the element).
I’d need to see your full code but I suspect that you are still absolutely positioning things and trying to match them up with different absolutely placed things which as I have said many times now is futile
If you do it correctly from the start then things become much easier.
If the table is absolutely placed into position then you need to wrap the table in a div and absolutely place the div and not the table. Then you will need no height on the parent div.