Webflow + Custom Code

Inline CSS

Overview
Using Custom Code
100
Custom Code Character Limit
101
Custom Code
HTML Encoding & Decoding
102
Advanced Techniques
Tracking w/ Cookies & Web Storage
600
Inline Coding Techniques
4:41
601
Inline CSS
4:41
602
Webflow.js
Webflow.js
700
Sygnal Webflow Utilities ( WFU )
Sygnal Webflow Utils ( WFU )
800
Helper Functions
802
No items found.
Updated
April 17, 2024
in lightbox

Webflow's HTML Embeds are a very handy tool. When they contain a CSS style block, that CSS is recognized by Webflow's designer and applied at design-time.

Use cases

  • Apply any CSS styling that isn't natively supported in the designer, e.g. complex nth-item setups
  • Vary font selection by locale
  • Add behavior, like scroll-top adjustments
  • Temporarily hide obstructing elements like megamenus, sidebars, pop-up modals and cookie-consent dialogs so that you can work in the designer, unobstructed.

Tips

  • When you are storing <style> content in an HTML embed, make it the only element in that Embed. If you have other content such as a <script> block, the designer may ignore that embed entirely.
  • For styling you want site-wide, place it inside of a site-wide component, such as your Nav or Footer components.
  • The Visibility: hidden setting can be used to suppress that style block arbitrarily, which makes it an excellent tool for hiding a cookie consent dialog or popup temporarily while you're working in the designer.

‍

Table of Contents
Comments
Did we just make your life better?
Passion drives our long hours and late nights supporting the Webflow community. Click the button to show your love.