Jump to content
  • 0

Как сверстать так.


Светлана Г.
 Share

Question

Здравствуйте! Вот такая задача.

Низ макета имеет тень и выглядит так:.

4218388m.png

 

Как это  сверстать?

У меня получается так, что тень не видна:

4211221m.png

 

Стили и код:

@boxshadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.43);html {	height:100%;    font-family:Arial, Helvetica, sans-serif;    font-size:12px;    background: rgb(232,203,212);}body{	height:100%;	margin:0;}#wrapper {    position: relative;    min-height:100%;    max-width: 814px;	/*overflow:hidden;*/    background-color: #f0e5e4;	margin:auto;    box-shadow: @boxshadow;}@media (max-width: 480px) {header {position: absolute;height: 30%;width: 100%;}}
<!DOCTYPE html><!--[if lte IE 8]><html class="ie8" lang="ru"><![endif]--><!--[if gt IE 9]><html lang="ru"><![endif]--><!--[if !IE]>--><html lang="ru"><!--<![endif]-->    <head>        <meta charset="utf-8" />        <meta name="viewport" content="width=device-width, initial-scale=1.0">        <!--[if lt IE 9]>             <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>         <![endif]-->        <link type="text/css" rel="stylesheet" href="style.css" />        <title>lustshop.biz</title>    </head>    <body>        <div id="wrapper" class="clearfix">            <header>                <img src="/img/headerBg.jpg" alt="">                <nav id="menu">                    <ul>                        <li><a href="#">Каталог</a></li>                        <li><a href="#">Контакты</a></li>                        <li><a href="#">Доставка</a></li>                        <li><a href="#">Размеры</a></li>                        <li><a href="#">О нас</a></li>                    </ul>                </nav><!-- /#menu -->            </header>        </div><!-- /#wrapper -->    </body></html>

Также обращаю внимание на то, что мне важно указывать высоту #wrapper, так высота header рассчитывается от общей высоты контейнера.

 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Как вариант, вместо

min-height: 100%;

сделать

 min-height: 95%; margin-bottom: 5%;

Ещё можно задать нижний padding у body. Но будет не ясно с подвалом, я не знаю будет ли он у вас и какой. Edited by wwt
Link to comment
Share on other sites

  • 0

Это видимо, из-за таких стилей, которые сгенерил генератор:

/* IE9 SVG, needs conditional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NldD0iNzglIiBzdG9wLWNvbG9yPSIjZGJhZGJhIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iODklIiBzdG9wLWNvbG9yPSIjZGFhYWI2IiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Q5YWFiNiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
background: -moz-linear-gradient(top, rgba(232,203,212,1) 0%, rgba(233,203,213,1) 5%, rgba(229,198,206,1) 13%, rgba(228,192,202,1) 25%, rgba(225,189,199,1) 43%, rgba(224,186,197,1) 52%, rgba(224,184,195,1) 58%, rgba(220,176,189,1) 73%, rgba(219,173,186,1) 78%, rgba(218,170,182,1) 89%, rgba(217,170,182,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(232,203,212,1)), color-stop(5%,rgba(233,203,213,1)), color-stop(13%,rgba(229,198,206,1)), color-stop(25%,rgba(228,192,202,1)), color-stop(43%,rgba(225,189,199,1)), color-stop(52%,rgba(224,186,197,1)), color-stop(58%,rgba(224,184,195,1)), color-stop(73%,rgba(220,176,189,1)), color-stop(78%,rgba(219,173,186,1)), color-stop(89%,rgba(218,170,182,1)), color-stop(100%,rgba(217,170,182,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(232,203,212,1) 0%,rgba(233,203,213,1) 5%,rgba(229,198,206,1) 13%,rgba(228,192,202,1) 25%,rgba(225,189,199,1) 43%,rgba(224,186,197,1) 52%,rgba(224,184,195,1) 58%,rgba(220,176,189,1) 73%,rgba(219,173,186,1) 78%,rgba(218,170,182,1) 89%,rgba(217,170,182,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(232,203,212,1) 0%,rgba(233,203,213,1) 5%,rgba(229,198,206,1) 13%,rgba(228,192,202,1) 25%,rgba(225,189,199,1) 43%,rgba(224,186,197,1) 52%,rgba(224,184,195,1) 58%,rgba(220,176,189,1) 73%,rgba(219,173,186,1) 78%,rgba(218,170,182,1) 89%,rgba(217,170,182,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(232,203,212,1) 0%,rgba(233,203,213,1) 5%,rgba(229,198,206,1) 13%,rgba(228,192,202,1) 25%,rgba(225,189,199,1) 43%,rgba(224,186,197,1) 52%,rgba(224,184,195,1) 58%,rgba(220,176,189,1) 73%,rgba(219,173,186,1) 78%,rgba(218,170,182,1) 89%,rgba(217,170,182,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(232,203,212,1) 0%,rgba(233,203,213,1) 5%,rgba(229,198,206,1) 13%,rgba(228,192,202,1) 25%,rgba(225,189,199,1) 43%,rgba(224,186,197,1) 52%,rgba(224,184,195,1) 58%,rgba(220,176,189,1) 73%,rgba(219,173,186,1) 78%,rgba(218,170,182,1) 89%,rgba(217,170,182,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e8cbd4', endColorstr='#d9aab6',GradientType=0 ); /* IE6-8 */

 

Если это все убрать - то фон однородный. Надо почистить от лишнего.


Лучше сделаю картинкой фон! 

 

 

Так потому что он у вас в html прописан, не ?

 

Прописывала и для body - также.

wwt, спасибо большое за помощь! Оставлю вариант:

min-height: 95%;
margin-bottom: 5%;

Edited by Светлана Г.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy