Здравейте, искам да помоля за помощта ви, за да центрирам списък поставен в div. Това е прост пример, за да не пиша целия код и за да е по-лесно(Благодаря на всички предварително
) :
<html>
<head>
<title>Центриран "li"</title>
<style type="text/css">
body {
margin: 0;
}
.main_container {
width: 800px;
margin: 100px auto auto auto;
border: 3px solid red;
}
.main_container ul {
margin:0 auto;
height: 20px;
border: 2px solid black;
}
.main_container ul li {
margin:0 auto;
float: left;
border: 1px solid blue;
list-style-type: none;
text-align: center;
}
</style>
</head>
<body>
<div class="main_container">
<ul><li>1234</li>
<li>5678</li>
<li>0912</li>
</ul>
</div>
</body>
</html>
<html>
<head>
<title>Центриран "li"</title>
<style type="text/css">
body {
margin: 0;
}
.main_container {
width: 800px;
margin: 100px auto auto auto;
border: 3px solid red;
}
.main_container ul {
margin:0 auto;
height: 20px;
border: 2px solid black;
}
.main_container ul li {
margin:0 auto;
float: left;
border: 1px solid blue;
list-style-type: none;
text-align: center;
}
</style>
</head>
<body>
<div class="main_container">
<ul><li>1234</li>
<li>5678</li>
<li>0912</li>
</ul>
</div>
</body>
</html>