I'm trying to set a background image on the floating bar at the bottom of my page: .
Unfortunately, the background image is being cut off by each table cell.
I've attempted two solutions:
1. Converting the table to divs and setting the background image. This works, but I am unable to center the button in the middle of the floating bar. Here's the code snippet to convert a table to divs:
jQuery('#wpfront-notification-bar > table').replaceWith( jQuery('#wpfront-notification-bar > table').html()
.replace(/<tbody/gi, "<div id='table'")
.replace(/<tr/gi, "<div")
.replace(/<\/tr>/gi, "</div>")
.replace(/<td/gi, "<span")
.replace(/<\/td>/gi, "</span>")
.replace(/<\/tbody/gi, "<\/div")
);
How can I center the button?
Alternatively, my second solution was to create an overlay div and set it to display:absolute;
with a background image. However, I encountered the same issue. How can I center the button while ensuring the overlay wrapper is positioned beneath the text?
I believe the first solution is more viable, but how can I achieve centering it? Do you have any suggestions or other alternatives?
Sincerely,