Здравейте имам проблем с кодирането на една кутийка, незнайно защо информацията в нея отива много надясно от зададените и граници, и това само когато информацията в нея е в таговете ul -> li
Така подразбира се, че информацията трябва да е в центъра, но не е .. Всичко това отива в дясно само когато информацията е в ul -> li.. Ето кода
HTML
CSS
[css]
.small-panel-top {
background:url('../images/small-panel-top.png') no-repeat;
width:240px;
height:45px;
float:left;
position:relative;
}
.small-panel-top-title {
color:#fff;
float:left;
line-height:35px;
padding:0 0 0 15px;
}
.small-panel-center {
background:url('../images/small-panel-center.png') repeat-y;
width:240px;
height:100%;
}
.small-panel-center-info {
width:240px;
margin:auto;
padding:10px 0 10px 0;
}
.small-panel-center-info ul{
list-style:none;
}
.small-panel-center-info ul li {
background:url('../images/back.png') no-repeat;
height:25px;
width:238px;
margin:auto;
padding:0 0 10px 0;
}
.small-panel-center-info ul li a{
line-height:25px;
text-decoration:none;
font-weight:bold;
text-align:center;
color:#27498f;
}
.small-panel-bottom {
background:url('../images/small-panel-bottom.png') no-repeat;
width:240px;
height:25px;
margin:-11px 0 0 0;
}
.strike {
padding:0 15px 0 0;
}
[/css]
Така подразбира се, че информацията трябва да е в центъра, но не е .. Всичко това отива в дясно само когато информацията е в ul -> li.. Ето кода
HTML
HTML:
<div class="small-panel-top">
<div class="small-panel-top-title">Главно меню</div>
</div>
<div class="clear"></div>
<div class="small-panel-center">
<div class="small-panel-center-info">
<ul>
<li><img src="images/strike.png" class="strike" alt="" /><a href="#">Начало</a></li>
</ul>
</div>
</div>
<div class="clear"></div>
<div class="small-panel-bottom"></div>
CSS
[css]
.small-panel-top {
background:url('../images/small-panel-top.png') no-repeat;
width:240px;
height:45px;
float:left;
position:relative;
}
.small-panel-top-title {
color:#fff;
float:left;
line-height:35px;
padding:0 0 0 15px;
}
.small-panel-center {
background:url('../images/small-panel-center.png') repeat-y;
width:240px;
height:100%;
}
.small-panel-center-info {
width:240px;
margin:auto;
padding:10px 0 10px 0;
}
.small-panel-center-info ul{
list-style:none;
}
.small-panel-center-info ul li {
background:url('../images/back.png') no-repeat;
height:25px;
width:238px;
margin:auto;
padding:0 0 10px 0;
}
.small-panel-center-info ul li a{
line-height:25px;
text-decoration:none;
font-weight:bold;
text-align:center;
color:#27498f;
}
.small-panel-bottom {
background:url('../images/small-panel-bottom.png') no-repeat;
width:240px;
height:25px;
margin:-11px 0 0 0;
}
.strike {
padding:0 15px 0 0;
}
[/css]