Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Binary file added karam-karim/task-3/arrow-down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added karam-karim/task-3/france.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added karam-karim/task-3/germany.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions karam-karim/task-3/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>task 3</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>

<div class="container">
<ui class="dropdown" data-text="Select Language">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this tag ui?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo, It meant to be ul not ui.


<li class="option">france</li>
<li class="option">germany</li>
<li class="option">united kingdom</li>
<li class="option">poland</li>

</ui>
</div>

</body>
</html>
Binary file added karam-karim/task-3/poland.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions karam-karim/task-3/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
body{
margin: 0;
padding: 0;
background-color: rgb(198,200,197);
font-family: Open Sans;
}

.container{
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
}



.container > .dropdown{
background-color: #fff;
list-style: none;
position: relative;
border-radius: 5px;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are missing shadow in dropdown

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, sorry about this one it was 2 am and I didn't notice it in the pics.

}
/* the header */
.container > .dropdown::before{
content: attr(data-text);
color: lightgrey;
font-size: 1.1em;
font-weight: bold;
padding: 1.5em;
width: 20em;
display: flex;
background-color: #fff;
border-radius: 5px;
position: absolute;
top: -40%;
background-image: url(arrow-down.png);
background-position: calc(100% - 10px);
background-repeat: no-repeat;
background-size: 16px;
}

/* the country names */

.container > .dropdown > .option{
color: grey;
text-transform: capitalize;
box-sizing: border-box;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
width: 25em;
padding: 1.5em;
padding-left: 4em;
position: relative;
}

/* the country image */
.container > .dropdown > .option::before{
content: '';
display: block;
width: 40px;
height: 40px;
position: absolute;
left: 10px;
top:50%;
transform: translateY(-50%);
background-position: left;
background-repeat: no-repeat;
background-size: 40px;
}

.container > .dropdown > .option:nth-child(1)::before{
background-image: url(france.png);
}

.container > .dropdown > .option:nth-child(2)::before{
background-image: url(germany.png);
}

.container > .dropdown > .option:nth-child(3)::before{
background-image: url(united-kingdom.png);
}

.container > .dropdown > .option:nth-child(4)::before{
background-image: url(poland.png);
}
Binary file added karam-karim/task-3/united-kingdom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.