Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The session style has issues after Dify is embedded in the website. #11205

Closed
5 tasks done
niemingxing-poper opened this issue Nov 29, 2024 · 1 comment
Closed
5 tasks done
Labels
🐞 bug Something isn't working cloud When the version is cloud and it is a bug report

Comments

@niemingxing-poper
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

Version 0.12.1

Cloud or Self Hosted

Cloud

Steps to reproduce

The session style has issues after Dify is embedded in the website, with the top of the session being completely obscured.
WechatIMG294

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

@dosubot dosubot bot added cloud When the version is cloud and it is a bug report 🐞 bug Something isn't working labels Nov 29, 2024
Copy link

dosubot bot commented Nov 29, 2024

@niemingxing-poper Hello there! I'm here to assist you with any bugs, questions, or contributions you may have regarding Dify. Let's work together to solve this issue!

To address the session styling issues you're experiencing with Dify when embedded in a website, consider the following steps:

  1. Modify CSS Variables: You can customize the default styles using CSS variables. For example, adjust the position or size of elements to ensure they are not obscured. Here's a basic example of how you might change the background color:

    #dify-chatbot-bubble-button {
        --dify-chatbot-bubble-button-bg-color: #ABCDEF;
    }
  2. Use containerProps Option: This allows you to set inline styles or apply CSS classes to the Dify components. You can adjust styles like width, height, and position to ensure visibility:

    window.difyChatbotConfig = {
        containerProps: {
            style: {
                backgroundColor: '#ABCDEF',
                width: '60px',
                height: '60px',
                borderRadius: '30px',
            },
        },
    }
  3. Check for Conflicting Styles: Ensure that your website's CSS is not conflicting with Dify's styles. Use browser developer tools to inspect the elements and see which styles are being applied.

  4. Adjust iFrame Styles: If you're using an iframe to embed Dify, you can directly modify the style attribute in the iframe code to adjust its appearance and position:

    <iframe src="https://udify.app/chatbot/ez1pf83HVV3JgWO4" style="width: 80%; height: 80%; min-height: 500px; border: 2px solid #000; position: fixed; bottom: 20px; right: 20px;" frameborder="0" allow="microphone"></iframe>

These steps should help you troubleshoot and resolve the styling issues you're encountering. If the problem persists, reviewing the specific CSS rules applied to the embedded Dify components might provide further insights [1][2].

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Dec 30, 2024
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2025
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working cloud When the version is cloud and it is a bug report
Projects
None yet
Development

No branches or pull requests

1 participant