<style>
tag with ::before
and ::after
CSS inside an Embed element or in Page/Project Settings.You can add ::before
and ::after
pseudo-elements to a button in Webflow by using custom code, since Webflow’s visual styling tools don’t support pseudo-elements by default.
Drag an Embed element (from the Components panel) into your page, ideally in the Page Settings or just above your section.
Inside the Embed, include a <style>
tag with CSS targeting your button's class and the ::before
/ ::after
elements.
Example (adjust as needed):
```html
```
Save & Close the Embed.
The changes will not be visible inside the Designer, but will appear on the published site.
<style>
block in the Head section.To use ::before
and ::after
pseudo-elements on a button in Webflow, assign a custom class to the button and inject your CSS using an Embed element or custom code block. Webflow won’t render these in the Designer, but they’ll show correctly once published.