Warning: Cannot use a scalar value as an array in /home/admin/public_html/forum/include/fm.class.php on line 757

Warning: Invalid argument supplied for foreach() in /home/admin/public_html/forum/include/fm.class.php on line 770
Форумы портала PHP.SU :: Версия для печати :: Два столбца, один фиксированный - другой нет. Макет резиновый.
Форумы портала PHP.SU » Клиентская разработка » HTML, Дизайн & CSS » Два столбца, один фиксированный - другой нет. Макет резиновый.

Страниц (1): [1]
 

1. ZekMan - 25 Июня, 2011 - 22:51:06 - перейти к сообщению
Проблема в том что нужно растянуть по высоте min-height: 100%; что собственно и не получается.
CODE (html):
скопировать код в буфер обмена
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
  3. <head>
  4.         <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
  5.         <title>Kanifas redesing v1.3</title>
  6.         <link rel="stylesheet" type="text/css" href="css/style.css" media="all" />
  7. </head>
  8. <body>
  9.         <div class="page">
  10.                 <div id="container">
  11.                         <div id="content">
  12.                                 <strong>Content:</strong> Sed placerat accumsan ligula. Aliquam felis magna, congue quis, tempus eu, aliquam vitae, ante. Cras neque justo, ultrices at, rhoncus a, facilisis eget, nisl. Quisque vitae pede. Nam et augue. Sed a elit. Ut vel massa. Suspendisse nibh pede, ultrices vitae, ultrices nec, mollis non, nibh. In sit amet pede quis leo vulputate hendrerit. Cras laoreet leo et justo auctor condimentum. Integer id enim. Suspendisse egestas, dui ac egestas mollis, libero orci hendrerit lacus, et malesuada lorem neque ac libero. Morbi tempor pulvinar pede. Donec vel elit.
  13.                         </div><!-- #content-->
  14.                 </div><!-- #container-->
  15.                
  16.                 <div class="sidebar" id="sideRight">
  17.                         <strong>Right Sidebar:</strong> Integer velit. Vestibulum nisi nunc, accumsan ut, vehicula sit amet, porta a, mi. Nam nisl tellus, placerat eget, posuere eget, egestas eget, dui. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In elementum urna a eros. Integer iaculis. Maecenas vel elit.
  18.                 </div><!-- .sidebar#sideRight -->
  19.         </div>
  20. </body>
  21. </html>

CODE (html):
скопировать код в буфер обмена
  1.  
  2. * {
  3.         margin: 0;
  4.         padding: 0;
  5. }
  6. html {
  7.         height: 100%;
  8. }
  9. body {
  10.         font: 12px/18px Arial, Tahoma, Verdana, sans-serif;
  11.         height: 100%;
  12.         background-color:#999;
  13. }
  14. a {
  15.         color: blue;
  16.         outline: none;
  17.         text-decoration: underline;
  18. }
  19. a:hover {
  20.         text-decoration: none;
  21. }
  22. p {
  23.         margin: 0 0 18px
  24. }
  25. img {
  26.         border: none;
  27. }
  28. input {
  29.         vertical-align: middle;
  30. }
  31.  
  32. .page {
  33.         min-width: 1000px;
  34.         max-width: 1200px;
  35.         margin: 0 auto;
  36.         min-height: 100%;
  37.         background-color:#FFF;
  38. }
  39.  
  40. /*левая колонка*/
  41. #container {
  42.         width: 100%;
  43.         float: left;
  44.         background-color:green;
  45.         position:relative;
  46.         min-height:100%;
  47. }
  48. #content {
  49.         padding: 0 200px 0 0;
  50.         position:relative;
  51.         background-color:red;
  52. }
  53.  
  54. /* правая колонка */
  55. #sideRight {
  56.         float: left;
  57.         width: 200px;
  58.         margin-left: -200px;
  59.         position: relative;
  60.         background: #FFACAA;
  61.         min-height:100%;
  62. }
  63.  
  64.  
2. join - 01 Июля, 2011 - 11:31:56 - перейти к сообщению
Если ишак не хочет растягивать:
добавьте height:100%(туда же, где стоят min-height:100%)
3. komprenda - 01 Июля, 2011 - 11:40:30 - перейти к сообщению
доктайп снеси и всё заработает (height: 100%)

 

Powered by ExBB FM 1.0 RC1