以下のコードのリンクの下にあるドロップダウンを中央に配置しようとしています。これはどのように行われますか?を使用して表示/非表示の部分を実行しますが、後でjquery
文字の下の中央に配置できません。r
glyphicon
<!DOCTYPE html>
<html>
<head>
<title> New Document </title>
<style type="text/css">
.main{
width:300px;
background:cyan;
}
.right{
float:right;
position: relative;
white-space: nowrap;
}
ul {
list-style:none outside none;
padding:0px;
margin:0;
position:absolute;
right: 0;
}
</style>
</head>
<body>
<div class="main">
Left
<div class="right">
<span>R</span>
<ul>
<li>Option 1</li>
<li>Option 2</li>
<li>Option 3</li>
<li>Option 4</li>
</ul>
</div>
</div>
</body>
</html>