|
|
|
| Вот сам html код страницы.
<html>
<head>
<title></title>
</head>
<body>
<style type="text/css">
.wrap {
background-color: #eee;
color: #000;
border: solid 1px #000;
margin-top: 2px;
overflow: hidden;
}
.golosa {
background-color: #c0c0c0;
font-size: 8pt;
display: block;
height:15px;
}
.proc {
padding-left: 45px;
position: absolute;
}
</style>
<div class="wrap" style="width:100px">
<span class="golosa" style="background: #CCCCCC; width: 10px;"><span class="proc">2</span></span>
</div>
<div class="wrap" style="width:100px">
<span class="golosa" style="background: #CCCCCC; width: 0px;"><span class="proc">0</span></span>
</div>
<div class="wrap" style="width:100px">
<span class="golosa" style="background: #CCCCCC; width: 30px;"><span class="proc">10</span></span>
</div>
<div class="wrap" style="width:100px">
<span class="golosa" style="background: #CCCCCC; width: 100px;"><span class="proc">30</span></span>
</div>
</body>
</html>
|
Там 4 ячейки, в них надпись, как сделать что бы эта надпись всегда была ровно по середине? | |
|
|
|
|
|
|
|
для: Бамси
(20.04.2007 в 07:30)
| | мне кажется дивомания перешагнула все границы. в данном случае необходимо юзать таблицы, ибо в блоки запихываются таличные данные
собственно можно так
<style>
.mydiv {padding:50%;}
</style>
|
| |
|
|
|
|
|
|
|
для: Lelik
(20.04.2007 в 10:32)
| | Есть ещё такой секретный стиль: text-align:center
(создать для него вложенный див) | |
|
|
|
|
|
|
|
для: 12345
(20.04.2007 в 13:35)
| | Согласен с 12345 подобная проблема решается текст-аляйном:
.proc {
position: absolute;
width: 100px;
font-size: 8pt;
text-align: center;
}
|
| |
|
|
|