Home › Forums › CSS › Create an "if"rule when URL contains /en/ using CSS › Reply To: Create an "if"rule when URL contains /en/ using CSS
January 7, 2019 at 10:48 pm
#281026
Beverleyh
Participant
It isn’t possible with CSS alone; you would need PHP or JavaScript doing some logic like;
1. Get/identify URL
2. Search URL for “/en/”
3. If found, add “en” class to html or body element
THEN, with this class present, you can utilise a CSS override selector;
.en .price_box:before {
content: ‘Starting From ‘;
}