Xin chào mọi người. Em đang code frontend một trang web bán hàng cho đồ án môn học. Thì trong lúc tạo thanh menu, em có tạo drop-down menu một vài button nhưng mà khi em hover vào thì dropdown-menu sẽ hiện nhưng không thể chi chuyển vào phần drop-down đó. Giúp em khắc phục với ạ.
Em xin cảm ơn
đây là phần css
* {
padding: 0px;
margin: 0px;
font-family: SVN-Poppins;
}
/* ----------header------------- */
header {
display: flex;
flex-direction: column;
}
.header-announcement {
padding: 10px;
text-align: center;
background-color: #db7093;
}
.announce-content {
color: white;
font-size: 20px;
}
.search-icon {
width: 25px;
}
.header_bottom--top {
display: flex;
}
.logo {
width: 20%;
}
.logo-img {
width: 250px;
height: 100%;
flex: 1;
}
.others {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
flex: 3;
}
.others>li {
padding: 10px 0px;
/* width: 10%; */
font-size: 20px;
}
li {
list-style-type: none;
}
a {
text-decoration: none;
color: black;
}
.others>li:first-child {
width: 50%;
}
.others>li:first-child input {
width: 80%;
position: relative;
border: 3px solid #db7093;
padding: 5px;
border-right: none;
height: 50px;
font-size: 20px;
border-radius: 5px 0 0 5px;
outline: none;
}
.others>li:first-child i {
position: absolute;
background-color: #db7093;
padding: 23px;
border-radius: 0px 5px 5px 0px;
}
.others>li:last-child {
text-align: right;
margin-right: 10px;
color: red;
display: flex;
/* width: 25%; */
}
.menu-btn {
display: flex;
flex-direction: column;
align-items: center;
}
.menu-btn>span {
margin-top: 5px;
}
.fas {
font-size: 25px;
}
.fa-phone-alt {
font-size: 40px;
}
.others>li a:hover {
color: black;
text-decoration: none;
border: 1px solid gray;
border-radius: 5px;
}
.header_bottom--menu {
display: flex;
padding: 10px;
font-size: 25px;
justify-content: space-evenly;
}
.header_bottom--menu>li {
position: relative;
padding: 0px 10px;
font-weight: bold;
/* display: block; */
}
.header_bottom--menu>li :hover {
text-decoration-line: underline;
}
.sub-menu {
position: absolute;
width: fit-content;
background-color: gainsboro;
padding: 10px 10px;
font-size: 18px;
display: none;
}
/*trỏ vào thì hiển thị menu con chứa các danh mục sp */
/* .wrap {
width: fit-content;
height: fit-content;
} */
.header_bottom--menu>li :hover+.sub-menu {
display: block;
}
.sub-menu>li {
margin-bottom: 5px;
font-weight: normal;
}
.sub-menu>li :hover {
text-decoration-line: underline;
margin-left: 10px;
color: #db7093;
}
/*--- ---------chat-box & nút trở về đầu trang----------- */
.open-button-1 {
color: white;
padding: 16px 20px;
border: none;
cursor: pointer;
opacity: 0.8;
position: fixed;
bottom: 23px;
right: 28px;
width: 50px;
}
.open-button-2 {
/* background-color: #555; */
color: white;
padding: 16px 20px;
border: none;
cursor: pointer;
opacity: 0.8;
position: fixed;
bottom: 100px;
right: 28px;
width: 50px;
}
/* The popup chat - hidden by default */
.chat-popup {
display: none;
position: fixed;
bottom: 5px;
right: 125px;
/* border: 3px solid #f1f1f1; */
z-index: 9;
}
/* Add styles to the form container */
.form-container {
max-width: 300px;
padding: 10px;
background-color: white;
box-sizing: border-box;
border: 1px solid black;
border-radius: 20px;
}
/* Full-width textarea */
.form-container textarea {
width: 89%;
padding: 15px;
margin: 5px 0 22px 0;
border: none;
background: #f1f1f1;
resize: none;
min-height: 50px;
}
.inputNameOnChatPopUp {
width: 89%;
padding: 15px;
margin: 5px 0 22px 0;
border: none;
background: #f1f1f1;
resize: none;
}
.inputEmailOnChatPopUp {
width: 50%;
padding: 15px;
margin: 5px 0 22px 0;
border: none;
background: #f1f1f1;
resize: none;
display: inline;
}
.inputPhoneOnChatPopUp {
width: 26.8%;
padding: 15px;
margin: 5px 0 22px 0;
border: none;
background: #f1f1f1;
resize: none;
}
/* When the textarea gets focus, do something */
.form-container textarea:focus {
background-color: #ddd;
outline: none;
}
/* Set a style for the submit/send button */
.form-container .btn {
background-color: #f5deb3;
color: black;
font-weight: bold;
font-family: svn-poppins;
padding: 16px 20px;
border: none;
cursor: pointer;
width: 100%;
margin-bottom: 10px;
opacity: 0.8;
}
/* Add a red background color to the cancel button */
.form-container .cancel {
background-color: red;
}
/* Add some hover effects to buttons */
.form-container .btn:hover,
.open-button-1:hover,
.open-button-2:hover {
opacity: 1;
}
/* ---------------------------------footer----------------------- */
footer {
width: 100%;
height: 300px;
background-color: #FEFAE0;
display: flex;
justify-content: space-evenly;
}
.footer_content>a {
color: black;
font-size: 12px !important;
}
.footer_content {
margin: 20px 30px;
}
footer a:hover,
footer i:hover {
text-decoration: underline;
text-decoration-color: rgb(173, 173, 173);
text-decoration-style: dotted;
}
.fab {
font-size: 30px;
margin: auto 10px
}
.connect-icon {
text-align: center;
}