If I have a <select> list on my html page:
<body>
<div id="side-bar">...</div>
<div id="list">
<select id="mylist" size="10"></select>
</div>
</body>
How to CSS mylist to make it located in the middle of the <div id="list"> area? (Both horizontally and vertically)
You could try
#mylist {margin: 0 auto}. It centers only the select element. If you want to center all the content within your div then#list { text-align: center; }should do the trick.EDIT:
To center the select tag both vertically and horizontally you can do like this: