0

I have an iframe chatbot popup window html design but when I tried to add this design to the divi wordpress theme website then the popup design overlapped with the website's content.

Here I designed a popup-chat window chatbot link using an iframe in the tag. Please, have a look at the code it's a very simple design.

Please, guys help me to solve this issue.

Here is my iframe popup chatbot design. I am designing on this site:https://www.mycaresys.com/

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: Arial, Helvetica, sans-serif;}
* {box-sizing: border-box;}

/* Button used to open the chat form - fixed at the bottom of the page */
.open-button {
  background-color: #555;
  color: white;
  padding: 16px 20px;
  border: none;
  cursor: pointer;
  opacity: 0.8;
  position: fixed;
  bottom: 23px;
  right: 28px;
  width: 120px;
}

.cancel{
  background-color: #555;
  color: white;
  padding: 10px 10px;
  border-radius: 15px;
  cursor: pointer;
  opacity: 0.8;
  position: fixed;
  bottom: 35px;
  right:10px;
  width: 50px;
}

/* The popup chat - hidden by default */
.chat-popup {
  display: none;
  position: fixed; 
  bottom: 0;
  right: 15px;
  border: 3px solid #f1f1f1;
  z-index: 9;
}

/* Add styles to the form container */
.form-container {
  max-width: 400px;
  height: 500px;
  padding: 10px;
  background-color: white;
}

/* Full-width textarea */
.form-container textarea {
  width: 100%;
  padding: 15px;
  margin: 5px 0 22px 0;
  border: none;
  background: #f1f1f1;
  resize: none;
}

/* When the textarea gets focus, do something */
.form-container textarea:focus {
  background-color: #ddd;
  outline: none;
}

/* Set a style for the submit/send button */
.form-container .btn {
  background-color: #04AA6D;
  color: white;
  padding: 16px 20px;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-bottom:10px;
  opacity: 0.8;
}

/* Add a red background color to the cancel button */
.form-container .cancel {
  background-color: red;
}

/* Add some hover effects to buttons */
.form-container .btn:hover, .open-button:hover {
  opacity: 1;
}
</style>
</head>
<body>

<button class="open-button" onclick="openForm()">24/7 AI Chat</button>

<div class="chat-popup" id="myForm">
  <form class="form-container">
    <iframe id="myframe" src="https://chatbotapp2022.azurewebsites.net/home/chatbotcaresys" title="Caresys Chatbot" width="100%" height="100%"></iframe>

  </form>
  <button type="button" class="btn cancel" onclick="closeForm()">Close</button>
</div>

<script>
function openForm() {
  document.getElementById("myForm").style.display = "block";
}

function closeForm() {
  document.getElementById("myForm").style.display = "none";
}
</script>

</body>
</html>
  • Not following what you're asking? The question mentions re-creating the popup button in the attached website, but it already looks the same? – cts May 14 '23 at 23:05
  • I am implementing this design on this website(https://www.mycaresys.com/) but there are CSS design issues. The **Popup is overlapping with the website's page content**. Please, check this image [link](https://prnt.sc/P2VRX6L1Vt0J) – Sazid Hasan Milon May 15 '23 at 17:58

0 Answers0