Cho mình hỏi, cớ sao mình đặt left: 30000px hay right: 30000px thì .dropdown-content vẫn không dịch chuyển?
- HTML
<div class="dropdown" style="float:left;">
<button class="dropbtn">Left</button>
<div class="dropdown-content" style="left:0;">
<a href="#">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
</div>
</div
- CSS
.dropdown {
position: relative;
border: 1px solid red;
}
.dropdown-content {
position: absolute;
width: 100px;
border: 1px solid;
background-color: yellow;
display: block;
left: 30000px;
}
.dropdown-content a{
display: block;
}