Hi,
Is there any way to change the grey background color of the Account Settings pane?
Hi @Alteco,
I’d never noticed that you’re not able to change the infobar colour as an option in settings
The below JavaScript seems to work ok
// Select the info bar element
var infoBar = document.querySelector("#knack-dist_1 > div.kn-info-bar");
// Check if the element is found
if (infoBar) {
// Change the background color
infoBar.style.backgroundColor = "#ff9e54";
}
Just update the backgroundColor to a hex code of your choosing.
Thanks Carl. It works perfectly
And thank you for making YouTube videos, I’m new to Knack I have subscribed to yours and David Parrish channel, keep up the good work
Hi @Alteco - I’m really pleased that this worked for you. I’m not a coder so I took a chance and located the element in the browsers DOM (Document Object Model) and copied the selector.
I then asked ChatGPT how I could add colour to the element and it came up with the code.
@Alteco - can you mark as “solved” please
It is really usefull ChatGPT
I thought I’d point out that CSS would be the better way to do this as the styles load before the JavaScript.
#knack-dist_1 > div.kn-info-bar {
background-color: #ff9e54
}
However this would depend on if you need to dynamically change the colour. If you just want to set the colour for all pages then I would suggest the above CSS.
Craig
Great info, thanks CSWinnall
Thanks @CSWinnall; I appreciate you jumping in on this one. As you’re probably aware, I’m not a coder, but wanted to help