Skip to content

Commit

Permalink
Update language selector modal with close button and improved styling
Browse files Browse the repository at this point in the history
- Added an "X" close button in the top-right corner of the language selector modal.
- Improved modal styling for better visibility and user experience.
- Enhanced language selection buttons with flag icons and hover effects.
- Added JavaScript functionality to close the modal on "X" click and "Esc" key press.
  • Loading branch information
Fumez-DEV authored Nov 4, 2024
1 parent ca015a2 commit 72fc1c2
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,80 @@ form.visible, #contact h2.visible, #contact p.visible {
opacity: 1;
transform: translateY(0);
}

/* Modal Styling */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
justify-content: center;
align-items: center;
z-index: 1000;
}

.modal-content {
background-color: #fff;
padding: 20px;
border-radius: 8px;
text-align: center;
position: relative;
width: 300px;
max-width: 90%;
}

/* Close Button Styling */
.close-button {
position: absolute;
top: 10px;
right: 10px;
background: none;
border: none;
font-size: 1.5rem;
color: #333;
cursor: pointer;
transition: color 0.3s;
}

.close-button:hover {
color: #888;
}

.modal-content h3 {
margin-top: 0;
}

.language-options {
display: flex;
justify-content: space-around;
margin-top: 20px;
}

.language-btn {
background-color: #f0f0f0;
border: none;
padding: 10px 20px;
border-radius: 8px;
font-size: 1rem;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
transition: background-color 0.3s;
}

.language-btn:hover {
background-color: #ddd;
}

.flag-icon {
width: 24px;
height: auto;
}

/* Footer Styling */
footer {
padding: 40px 20px;
Expand Down

0 comments on commit 72fc1c2

Please sign in to comment.