Skip to content

Commit dcb4527

Browse files
committed
enhancing menu and adding media queries for small screens
1 parent a9a99e9 commit dcb4527

File tree

2 files changed

+45
-11
lines changed

2 files changed

+45
-11
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<body>
1313
<header>
1414
<a id="menu-openner" href="#" onclick="toggleMenu()"><i class="material-icons">menu</i></a>
15-
<h1>Langage naturel vers <img alt="python" src="https://www.python.org/static/img/python-logo.png"/></h1>
15+
<h1>Langage naturel vers <a href="https://www.python.org/" target="_blanc"><img alt="python" src="https://www.python.org/static/img/python-logo.png"/></a></h1>
1616
</header>
1717
<nav style="left: -302px;">
1818
<h2>Menu</h2>

style.css

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,26 @@ body,html{
1414
color: white;
1515
padding: 0px;
1616
height: 40px;
17+
z-index: 10000;
1718
}
1819
#menu-openner i{
1920
font-size: 40px;
2021
}
2122
nav{
2223
position: absolute;
23-
top: 72px;
24+
top: 69px;
2425
z-index: 1000;
2526
background-color: white;
26-
height: calc(100vh - 75px);
27+
height: calc(100vh - 69px);
2728
width: 300px;
2829
border: 1px #cbcb solid;
2930
box-shadow: 2px 2px 10px silver;
3031
}
3132
nav ul{
32-
margin-top: 30px;
33-
padding-left: 20px;
33+
margin-top: 20px;
34+
margin-left: 20px;
35+
padding-left: 0px;
36+
border-bottom: 1px #cbcb solid;
3437
}
3538
nav a{
3639
color: black !important;
@@ -41,11 +44,23 @@ nav h2{
4144
margin-top: 10px;
4245
font-size: 1.8em;
4346
}
44-
nav li{
45-
border-top: 1px #cbcb solid;
47+
nav li {
4648
list-style-type: none;
4749
text-align: left;
50+
}
51+
nav li a{
52+
display: block;
53+
border-top: 1px #cbcb solid;
4854
padding: 15px;
55+
padding-left: 20px;
56+
transition : padding 500ms;
57+
}
58+
nav li a:hover{
59+
border-top: 0px #cbcb solid;
60+
/*background-color: #387aff;*/
61+
background-image: linear-gradient(110deg, rgba(0,0,0,0) 19px, #387aff 0%);
62+
color: white !important;
63+
padding-left: 30px;
4964
}
5065
.form-control{
5166
border: 1px #cbcb solid;
@@ -68,18 +83,21 @@ nav li{
6883
header{
6984
background-color: #2565e6;
7085
margin: 0px;
71-
padding: 20px;
86+
padding-bottom: 10px;
7287
padding-top: 5px;
73-
/*box-shadow: 5px 5px 5px silver;*/
7488
position: relative;
89+
z-index: 1000;
7590
}
7691
h1{
7792
margin: 0px;
78-
font-size: 25px;
93+
font-size: 30px;
7994
text-align: center;
95+
transform: translate(0,-5px);
96+
margin-left: 70px;
97+
margin-right: 70px;
8098
}
8199
h1 img{
82-
height:40px;
100+
height:45px;
83101
transform: translate(0,12px);
84102
}
85103
section{
@@ -156,4 +174,20 @@ h2{
156174
display: block;
157175
position: absolute;
158176
right: 10px;
177+
}
178+
@media screen and (max-width: 1000px) {
179+
section{
180+
display: block;
181+
}
182+
#inputArea, #outputArea{
183+
width: 100%;
184+
}
185+
}
186+
@media screen and (max-width: 500px){
187+
h1{
188+
font-size: 25px;
189+
}
190+
h1 img{
191+
height: 35px;
192+
}
159193
}

0 commit comments

Comments
 (0)