|
|
|
| Есть гланый контейнер, размером 95% от ширины экрана.
Мне нужно сделать чтобы в нем распологалось подряд 3 столбца шириной:
1) 20px
2) Второй столбец должен занимать всё оставшееся место (получается 95%-20px-20px)
3) 20px
Мой скрипт:
<div style="width:95%; margin: 0 auto;">
<div style="width:20px; background-color:#000"><br /></div>
<div style="width:100%; background-color:#FFF"><br /></div>
<div style="width:20px; background-color:#000"><br /></div>
</div>
|
Распологает контейнеры один под другим, а нужно в ряд. Что для этого надо исправить? | |
|
|
|
|
|
|
|
для: ivan1988
(13.09.2011 в 21:00)
| | Для того что бы выстроить div -ы в ряд надо использовать float: в css. Посмотрите по данной ссылке, там все в подробно описано http://htmlbook.ru/css/float. | |
|
|
|
|
|
|
|
для: magic
(14.09.2011 в 07:39)
| | Прописал каждому DIV float: left.
Всё равно не получается, надо чтобы она в ряд были | |
|
|
|
|
|
|
|
для: ivan1988
(14.09.2011 в 16:35)
| |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>1111</title>
<style type="text/css">
html {margin:0;height:100%;}
body {margin:0;height:100%; overflow: hidden;}
#wrapper {height:auto !important; height:100%; min-height:100%; min-width:100%;}
#container {height:auto !important; height:100%; min-height:100%; min-width:100%;}
#left {float:left; width:200px; height:100% !important; min-height: 97%;background: red;}
#right {float:right; width:200px; height:100%; min-height: 97%;background: yellow; }
#center {margin:0 200px 0 200px; min-height: 97%; overflow: auto;background: green;}
.clear {clear:both;}
</style>
</head>
<body>
<div id='wrapper'>
<div id='container'>
<div id='left'>#left column#</div>
<div id='right'>#right column#</div>
<div id='center'><div id='main'>no content</div>
</div>
</div>
</div>
</body>
</html>
|
| |
|
|
|