I am an absolute beginner. I've got a JavaScript project in which I must 'format specific elements differently depending on the type of browser used'
and I have no idea what to do with that. Should I check out how the code displays in diffrent browsers and then figure out how to optimize it or is there some kind of guide that shows which elements display diffrently?
I would be really grateful for any answer.
CodePudding user response:
You can use navigator.userAgent
in js (https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent) to get the name of a browser.
On this page(https://caniuse.com/), you can check if the feature is supported by a browser.
This article can be helpful for disabling default styling of HTML element.