Как мне выровнять эти выпадающие меню в центр? ⇐ Html
-
Anonymous
Как мне выровнять эти выпадающие меню в центр?
What's Up At Pearson?
.dropbtn {
font-family: Monospace;
font-size: 50px;
margin-top: 5px;
margin-bottom: 5px;
border-color: black;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: relative;
background-color: #f5e162;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: white;
padding: 12px 16px;
text-decoration: none;
display: block;
}
hr{
border-color:#ff5c4a;
}
.dropdown-content a:hover {background-color: #f25757;}
.dropdown:hover .dropdown-content {display: block;}
.dropdown:hover .dropbtn {background-color: #ddd;}
What's Up At Pearson?
Welcome to the website What's Up At Pearson? A semi-interactive place full of interviews
from your fellow students. Have some insight into different struggles students in
different subject areas may have while also learning some tips they may have that could
help you. (This is a new computer science project, sorry if website looks bad :[)
Different Subject Areas Listed Below
Math
Math
Sciences
Physics
Chemistry
Bio
Social Studies
Social Studies
English
English
CTS
Animation
Architecture
Computer Science
Construction
Pre-Engineering
Fine Arts
Art
Dance
Drama
Technical Theatre
Culinary
Personal
Buissness Managment
Gym
Yoga
< /code>
< /div>
< /div>
< /p>
Выше выше - это CSS, которые я сделал для выпадающих кнопок меню в HTML. Как я бы выровнял их в центр моего экрана? Я пробовал текстовый соглашение, но это не сработало. Одно решение, которое я попробовал раньше, только что заставило меню выйти из стороны кнопки, а не внизу. Есть ли какой -нибудь код, который выравнивает его в центре, все еще работает должным образом как меню?
Подробнее здесь: https://stackoverflow.com/questions/795 ... the-center
What's Up At Pearson?
.dropbtn {
font-family: Monospace;
font-size: 50px;
margin-top: 5px;
margin-bottom: 5px;
border-color: black;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: relative;
background-color: #f5e162;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: white;
padding: 12px 16px;
text-decoration: none;
display: block;
}
hr{
border-color:#ff5c4a;
}
.dropdown-content a:hover {background-color: #f25757;}
.dropdown:hover .dropdown-content {display: block;}
.dropdown:hover .dropbtn {background-color: #ddd;}
What's Up At Pearson?
Welcome to the website What's Up At Pearson? A semi-interactive place full of interviews
from your fellow students. Have some insight into different struggles students in
different subject areas may have while also learning some tips they may have that could
help you. (This is a new computer science project, sorry if website looks bad :[)
Different Subject Areas Listed Below
Math
Math
Sciences
Physics
Chemistry
Bio
Social Studies
Social Studies
English
English
CTS
Animation
Architecture
Computer Science
Construction
Pre-Engineering
Fine Arts
Art
Dance
Drama
Technical Theatre
Culinary
Personal
Buissness Managment
Gym
Yoga
< /code>
< /div>
< /div>
< /p>
Выше выше - это CSS, которые я сделал для выпадающих кнопок меню в HTML. Как я бы выровнял их в центр моего экрана? Я пробовал текстовый соглашение, но это не сработало. Одно решение, которое я попробовал раньше, только что заставило меню выйти из стороны кнопки, а не внизу. Есть ли какой -нибудь код, который выравнивает его в центре, все еще работает должным образом как меню?
Подробнее здесь: https://stackoverflow.com/questions/795 ... the-center
Мобильная версия