Home › Forums › WoodMart support forum › WooCommerce SiteWide Notice location › Reply To: WooCommerce SiteWide Notice location
amasterytchan
Hello Hung,
I spoke too soon. I’ve almost got it but could use your expertise to get it completely right. Please have a look.
This the CSS:
.woocommerce-store-notice {
position: fixed;
width: 100%;
top: 0;
left: 0;
z-index: 9999; /* Ensures the notice stays on top of other content */
background-color: #4497a6; /* Change to your site’s background color */
color: #ffffff; /* Change to your site’s text color */
font-size: 16px; /* Adjust based on your preference */
padding: 10px 20px; /* Adjust padding to better fit the content */
border-bottom: 2px solid #004970; /* Optional: adds a bottom border for contrast, change the color as needed */
}
.woocommerce-store-notice a {
color: #ffcc00; /* Change this color to make links stand out, if necessary */
}
/* body {
padding-top: 50px; /* Adjust this value based on the height of the notice to prevent content from being hidden behind it */
}
This moves the notice to the top but leaves a white banner even when the store notice isn’t active.
AM