JS to open window


Correction: In looking at the code again, I said the code came from Paul when in fact in came from you. Paul has been very helpful but I needed to set the record straight!

Thank you.


When I use scroll, it takes up most of the right margin where the text is right up against the scroll bar. I tried to alter the code a bit, but can't seem to find anything that works. Any suggestions?


    .modal-overlay {
  display: none;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, .5);
  opacity: 0;
  transition: opacity .2s ease;
.modal-overlay.active {
  display: flex;
.modal-overlay.visible {
  opacity: 1;
.modal-container {
  flex-basis: 50%;
  padding: 1rem;
  background-color: #fff;
  border-radius: 3px;
.modal-header {
  display: flex;
  font-weight: bold;
.modal-close {
  margin-left: auto;
  color: inherit;
  text-decoration: none;
  margin-top: -.5rem;
  font-size: 2rem;
.modal-content {
  max-height: 300px;
  overflow: auto;


Sorry for the late reply, I was in vacation the last week... anyway you might add some padding-right to the .modal-content then.


<div class="modal-overlay">
<div class="modal-container">
<div class="modal-header">
<a href="#" class="modal-close">&times;</a>
<div class="modal-content">

I am trying to use the modal in a table loop. You can see the rsView("useragent").

It works fine on the last entry in the database but only the last one. So I thought that if I put it in the loop it would work. It didn't.

Can you not use modals in loops?



This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.