# How do I pass Wix CSS into HTML embeds?

**URL:** <https://forum.wixstudio.com/t/how-do-i-pass-wix-css-into-html-embeds/70289>\
**Category:** Ask the community\
**Tags:** css, question, code, design\
**Created:** [April 13, 2025, 2:13pm UTC](https://forum.wixstudio.com/t/how-do-i-pass-wix-css-into-html-embeds/70289 "2025-04-13T14:13:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Draco](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/marc_draco/32/101440_2.png) [@Marc\_Draco](https://forum.wixstudio.com/u/Marc_Draco)\
**Post date:** [April 13, 2025, 2:13pm UTC](https://forum.wixstudio.com/t/how-do-i-pass-wix-css-into-html-embeds/70289/1 "2025-04-13T14:13:18Z")

</div>

I thought this would be simple (but as usual I thought wrong).

I need to pass the CSS my site into an HTML embed so the paragraph and any text in it changes with the Wix design and doesn’t look out of place. I tried doing it by copying the Class directive from the live page:

blah blah

As a simple test but it looks complete different. This is driving me nuts and there’s a simple solution, I’m sure but can I find it…

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [April 13, 2025, 2:24pm UTC](https://forum.wixstudio.com/t/how-do-i-pass-wix-css-into-html-embeds/70289/2 "2025-04-13T14:24:31Z")

</div>

Simple-Example:

1. Add your HTML-Component onto your Wix-page.
2. Generate your code for your HTML-Component…

```javascript
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Custom iFrame Page</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #121212;
      color: white;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      flex-direction: column; 
    }
    h1, h2 {
      margin: 0;
      padding: 0;
    }
  </style>
</head>
<body>
  <h1>Welcome to your own custom made iFrame-Page!</h1>
  <h2>Enjoy customizing your iFrame!</h2>
</body>
</html>

```

1. Paste that code into your iFrame
2. Save it.
3. Publish website.
4. See result.

CSS included here…

```javascript
<style>
    body {
      font-family: Arial, sans-serif;
      background-color: #121212;
      color: white;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      flex-direction: column; 
    }
    h1, h2 {
      margin: 0;
      padding: 0;
    }
  </style> 

```

Well this was the manual way! To make it more dynamic, you will have to generate a post-message communication bridge, beween Wix-Site and the HTML-Component → sending data back and forth.

---

<div class="post-metadata">

**Author:** ![onemoretime](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/onemoretime/32/104023_2.png) [@onemoretime](https://forum.wixstudio.com/u/onemoretime)\
**Post date:** [April 14, 2025, 1:50am UTC](https://forum.wixstudio.com/t/how-do-i-pass-wix-css-into-html-embeds/70289/3 "2025-04-14T01:50:51Z")

</div>

Hi, @Marc_Draco !!

I just remembered this great topic from the past and thought I’d share it. It might offer some kind of hint or inspiration. Apologies if it’s completely unrelated. 🫠

It looks like we’ll need to replace the entire HTML rather than just the CSS, so if possible, this might actually lead to a simpler solution. 😇

> [@CMS: Import HTML to Rich Content (Insert HTML Code)](https://forum.wixstudio.com/t/cms-import-html-to-rich-content-insert-html-code/59508):
>
> Question: How do I import HTML into CMS with Rich Content Field? Product: Wix Editor \> CMS I have a Database with a Rich Content Field where I imbed HTML Manually, there is no problem, but I want to import data into my database and cannot figure out how to “imbed” the HTML I exported my data to see what is generated, and this is what it came out as: The actual thing I wanted to do display the image from the url, WITHOUT uploading to media, but could not find another way to do it…
