body { font-family: Arial, sans-serif; } .add-news, .add-coupons { position: absolute; top: 30px; right: 70px; width: 50px; height: 50px; background-color: #4CAF50; color: white; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 24px; cursor: pointer; } #news-list, #coupons-list { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; margin: 0 20px; } .news-item{ display: flex; /* Aligns image and text in a row */ flex-direction: column; /* Change to 'row' for horizontal layout */ width: 260px; align-items: center; justify-content: center; margin: 0 15px 10px 0; padding: 20px; border: 1px solid #ddd; /* Optional: Adds a border */ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } img{ width: 100%; /* Make image responsive */ max-width: 400px; /* Set a maximum width for the image */ height: auto; /* Maintain aspect ratio */ border-radius: 10px; /* Optional: Adds rounded corners */ margin-bottom: 15px; } p{ font-size: 1.2rem; line-height: 1.5; text-align: center; /* Center the text */ color: #333; margin: 0; } @media (max-width: 768px) { .news-item { flex-direction: column; /* Stack elements on smaller screens */ } } .form-container, #coupons-form{ position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; } #form { background: white; padding: 20px; border-radius: 5px; width: 500px; height: 400px; } #title-part, #image-part, #code-part{ width:100%; height:60px; display: flex; align-items: center; } input{ width:100%; } textarea{ width: 100%; height: 180px; display: flex; } label{ padding-right: 10px; } #text-part, #description-part{ padding: 20px 0; } /* Style for the upload button */ #open-popup { padding: 10px 20px; background-color: #007bff; color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; } #image-popup { width: 400px; /* Set a width for the modal */ background-color: white; border-radius: 8px; padding: 20px; box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1); z-index: 1000; } #image-popup h3 { margin-top: 0; margin-bottom: 15px; font-size: 20px; color: #333; text-align: center; } /* Image preview area */ #image-preview { margin-top: 10px; text-align: center; padding: 10px; } /* Style for buttons inside the popup */ #image-popup button { padding: 8px 15px; margin-right: 10px; margin-top: 10px; background-color: #28a745; color: white; border: none; border-radius: 5px; cursor: pointer; } #edit-button, #save-button { background-color: #17a2b8; /* Blueish color */ } /* Overlay */ #overlay { background: rgba(0, 0, 0, 0.5); /* Semi-transparent background */ z-index: 999; /* Ensure it is behind the modal but above everything else */ } /* Button hover effects */ #image-popup button:hover, #open-popup:hover { opacity: 0.9; } /* Cancel button */ #cancel-button { background-color: #dc3545; /* Red color */ }