Skip to main content


Optimizely Knowledge Base

Move variation code to CSS in Optimizely

  • Fix flashing or flickering variation content on your website
  • Streamline visual changes so they run immediately

The Optimizely Web Editor usually serves experiments and campaigns without any visual hiccups, but you may occasionally encounter an issue with flashing or flickering content: when the original page appears briefly before your variation.

Optimizely's variation code waits for an element to be available in order to make a visual change. The code runs from top to bottom, and blocks changes to the elements below it as it waits. If you have a large number of visual changes in your variation code, you may see flashing.

One way to streamline your visual changes and reduce flashing is to move the visual changes to CSS.

CSS in the Variation Code Editor

The CSS in the Variation Code Editor runs immediately when it's set to synchronous timing. It applies only to the variation you're editing. 

Here's where to find it: 


  1. Navigate to the experiment or campaign, select a variation, and click the Variation Code Editor icon

  2. Click CSS to write CSS for this variation.