Ответы пользователя по тегу CSS
  • Как создать слой с шириной больше контейнера?

    Обязательно внутри контейнера? Что это будет? Карусель какая-то?

    UPD:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Документ без названия</title>
    <style type="text/css">
    .wrapper {
    	width:800px;
    	height:800px;
    	margin:0 auto;
    	border-left:1px #ccc solid;
    	border-right:1px #ccc solid;
    	background:white;
    }
    .wrapper .blue {
    	background:blue;
    	height:150px;
    }
    .wrapper .px300 {
    	height:300px;
    }
    .wrapper .red {
    	height:150px;
    	width:100%;
    	left:0;
    	position:absolute;
    	z-index:-1;
    	background:red;
    	margin-top:20px;
    }
    </style>
    </head>
    <body>
    <div class="wrapper">
      <div class="px300"></div>
      <div class="red"></div>
      <div class="blue"></div>
    </div>
    </body>
    </html>
    Ответ написан
    8 комментариев