This was done with the developer tools of the browser, they are extremely helpful for testing things before hard-coding.
Any custom code would be added to your website via:
Lay Options > Custom CSS & HTML > Custom CSS
The documentation page will really help you with this (there is also help with developer tools):
Best wishes Richardhttps://laytheme.com/documentation/custom-css-styling.html