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

Html css popup #233

Merged
merged 6 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
259 changes: 259 additions & 0 deletions submissions/DeamonFire/HTML-CSS-Popup/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
/* ------------------------------------ ALL setings ---------------------------- */

*{
box-sizing: border-box;
}

*:focus{
outline: 2px solid lightblue;
}

/* ----------------------------------- Header Menu ----------------------------- */
.header__h1{
display: none;
}

.header__menu {
display: flex;
justify-content: flex-end;
align-items: center;
flex-direction: row;
}

.header__menu_block {
padding: 30px;
list-style-type: none;
}

.header__menu_block:hover {
border: 1px solid lightblue;
}

.header__menu_block_link {
text-decoration: none;
color:gray;
}
.header__img {
width: 30px;
height: 30px;
}

/* --------------------------------- Dropdown #1 Popup ------------------------ */
.popup-menu {
position: relative;
}
.popup-menu__input{
position: absolute;
appearance: none;
background-image: url(../popup-icons/popup-button.png);
width: 2em;
height: 2em;
right: -1.5em;
top: -1em;
}
.popup{
height: 427px;
width: 300px;
overflow-y:auto;
box-shadow: -5px 5px 5px lightgray;
}
.popup-menu .popup {
display: none;
}
.popup-menu .popup-menu__label {
cursor: pointer;
}
.popup-menu .popup {
position: absolute;
right: -2em;
top: 2em;
margin: 0;
padding: 0;
width: auto;
}

.popup-menu__input:checked ~ .popup {
display: block;
}

.wrapper {
display: flex;
flex-wrap: wrap;
width: 300px;
border: 1px solid lightgrey;
justify-content: space-between;
padding: 15px 5px 0px 5px;
}

.wrapper__block_link {
text-decoration: none;
}

.wrapper__block {
display: grid;
width: 90px;
height: 90px;
margin: 2px;
}

.wrapper__block_link_item {
display: grid;
width: 90px;
height: 90px;
margin: 2px;
}

.wrapper__block_link_item:hover {
border: 1px solid lightgrey;
}

.wrapper__block_img {
width: 40px;
height: 30px;
justify-self: center;
align-self: center;
}

.wrapper__block_title {
display: flex;
color:gray;
align-items: center;
justify-content: center;
}

/* ------------------------------- Dropdown #2 More --------------------------- */
.more {
position: relative;
width: 290px;
}

.more__input{
position: absolute;
appearance: none;
}

.more__input:focus{
outline:none;
}

.more__input:focus + .more__label {
outline: 2px solid lightblue;
}

.more__label {
cursor: pointer;
}

.more__hidden {
display: none;
position: relative;
margin: 0;
padding-top: 20px;
right: 0.4em;
}

.more__label_text{
display: table-cell;
vertical-align: middle;
width: 300px;
background-color: rgb(230, 228, 228);
color: gray;
height:30px ;
cursor: pointer;
margin: -5px;
text-align: center;
}

.wrapper__block-end{
display: flex;
width: 290px;
color: gray;
height:35px ;
cursor: pointer;
align-items: center;
justify-content: center;
}

.wrapper__block-end_link{
text-decoration: none;
}

.more__input:checked ~ .more__hidden {
display: flex;
flex-wrap: wrap;
width: 300px;
border: 1px solid lightgrey;
justify-content: space-between;
}

.more__input:checked ~ .more__label{
display: none;
}


@media screen and (max-width: 500px) {
.header__menu_block {
padding: 20px;
list-style-type: none;
}
.popup-menu__input{
height: 2em;
right: -1.2em;
top: -1.1em;
}
.popup-menu .popup {
right: -6em;
}
}


@media screen and (max-width: 400px) {
.header__menu_block {
padding: 15px;
}
.popup-menu .popup {
right: -8em;
}
}

@media screen and (max-width: 320px) {
.header__menu_block {
padding: 13px;
list-style-type: none;
}
.popup-menu .popup {
right: -8em;
}
.popup{
height: 350px;
width: 150px;
box-shadow: -1px 1px 1px lightgray;
}
.wrapper__block {
width: 70px;
height: 70px;
margin: 2px;
}
.wrapper {
width: 250px;
padding: 15px 5px 0px 5px;
}
.wrapper__block_link_item {
width: 70px;
height: 70px;
margin: 2px;
}

.wrapper__block_img {
width: 30px;
height: 20px;
}

.wrapper__block-end{
width: 250px;
height:35px ;
}
.more__input:checked ~ .more__hidden {
width: 250px;
}
}
Loading