Forum Discussion
singalashwani
Oct 07, 2020Copper Contributor
CSS hack for Edge browser
I want to apply some CSS styles only in Edge browser and not able to find any CSS hack that only targets Edge browser. I am using Microsoft Edge Version 85.0.564.68 Thanks.
msekmfb1
Oct 07, 2020Iron Contributor
singalashwani You can search for "Edg" in UserAgent and dynamically load CSS file with rules for Edge.
singalashwani
Oct 07, 2020Copper Contributor
msekmfb1 thanks for the solution. Its working. Also can you please guide me any CSS hack also if I don't want to use JS to detect the navigator.
- msekmfb1Oct 07, 2020Iron Contributor
singalashwani There's no way to do that in pure CSS, you can add a class to document body based on browser name and use it in CSS, e.g. add "edge" class to body and add style like ".edge { ... }"