So I was trying to make an announcement bar for my website and I wrote a code directly in custom liquid code section. Code runs fine but I am facing an unwanted space issue in desktop and mobile both. I know its because of the code but how can i resolve it?
Heres the code :
/* Scrolling Announcement Bar Styles */
#announcement-bar {
color: #FFF; /* Font color (white) */
font-size: 45px; /* Font size */
text-align: center;
padding: 20px; /* Increase the padding to provide more space around the text */
margin-top: 20px; /* Increase the top margin to control the vertical spacing between lines */
width: 100%; /* Increase the width to make the background span the full width of the viewport */
position: relative;
animation: scroll 15s linear infinite;
white-space: nowrap;
overflow: hidden;
font-family: 'Poppins', sans-serif; /* Use Poppins font with a fallback of a generic sans-serif font */
font-weight: 900; /* Set font weight to 900 (maximum) */
line-height: 1; /* Reduce line height to decrease vertical space between lines */
}
@keyframes scroll {
0% { transform: translateX(100%); }
100% { transform: translateX(-100%); }
}
THIS IS TESTING SCROLLING BAR
THIS IS A SECOND LINE
THIS IS A THIRD LINE
@Sinanali - please open this page in customize settings and check this announcement bar section, you have padding top set to 40 and bottom to 52, make it 0 or smaller number and this space will be removed, you should see it like screenshot