search

Home  >  Q&A  >  body text

Effective Ways to Fix White Background Error in Spotify Embed Code

<p><br /></p> <pre class="brush:php;toolbar:false;"><iframe src="https://open.spotify.com/embed/track/6wsqVwoiVH2kde4k4KKAFU?utm_source=generator" width="500" height= "100" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe></pre> <p>I'm using NextJS 13.4. No problem in light mode. But when I switch to dark mode, there is a white background behind the song, like this: </p> <p>Background error in Spotify embed code</p> <p>I can't resolve this error via CSS. Thank you in advance. </p> <p>I want the song container to be transparent. </p>
P粉665427988P粉665427988496 days ago772

reply all(1)I'll reply

  • P粉005417748

    P粉0054177482023-08-16 10:31:12

    You should not style the background, but should use one of the supported heights, and then the player will have its own color to embed.

    In your case, do the following:

    1. Change the height to 80 (152 and 352 are larger options).
    2. Add frameBorder="0" to remove the surrounding white lines.
    3. Add style="border-radius:12px" to remove the white corners.

    reply
    0
  • Cancelreply