So im guessing then the css will force the image into position and then a.subscribebutton:visited {display = "none"} will remove it
Many Thanks both for your replies
TT
While a fun approach setting a:visited { display: none; } will likely not work on most modern browsers:
- Allowable CSS properties are color, background-color, border-color, border-bottom-color, border-left-color, border-right-color, border-top-color, column-rule-color, and outline-color.
- Allowable SVG attributes are fill and stroke.
- The alpha component of the allowed styles will be ignored. The alpha component of the element's non-:visited state will be used instead, except when that component is 0, in which case the style set in :visited will be ignored entirely.
- Although these styles can be change the appearance of colors to the end user, the window.getComputedStyle method will lie and always return the value of the non-:visited color.
This means you'll probably have to rely on JavaScript instead.
If you want the website to remember whether a user has clicked the button you'll then additionally have to persist it locally using either cookies, Local Storage or IndexedDB with Local Storage probably being the recommendable approach for this use case.