2016-10-14 3 views
1

Я пытаюсь воспроизвести этот дизайн http://www.csszengarden.com/217/ для практических целей.Дополнительное пространство внизу контейнера

У меня почти все правильно, за исключением того, что высота моего тела больше, чем содержание, которое оно содержит.

это код

*{ 
 
\t list-style: none; 
 
\t font-family: 'tablet-gothic-thin', sans-serif; 
 

 
}* 
 

 
div { 
 
\t display: block; 
 
} 
 

 
html { 
 
\t padding: 5%; 
 
\t background-color: #daede2; 
 
} 
 

 
body { 
 
\t margin: 0; 
 
\t padding: 0; 
 
\t background-color: #77c4d3; 
 
\t display: block; 
 
} 
 

 
.page-wrapper { 
 
\t margin: 0; 
 
\t padding: 0; 
 
\t height: auto; 
 
\t box-sizing: border-box; 
 
\t position: relative; 
 
\t z-index: 2; 
 
\t display: block; 
 
} 
 

 
.sidebar { 
 
\t background: rgba(246,247,146,0.9); 
 
\t position: absolute; 
 
\t top: 120px; 
 
\t right: 0px; 
 
\t width: 30%; 
 
\t padding: 1%; 
 
\t z-index: 2; 
 
\t display: block; 
 
} 
 

 
.preamble { 
 
\t background: rgba(255, 255, 255,0.9); 
 
\t position: relative; 
 
\t width: 50%; 
 
\t top: 100px; 
 
\t left: -70px; 
 
\t margin: 20px 0; 
 
\t line-height: 25px; 
 
\t padding-left: 120px; 
 
\t padding-top: 40px; 
 
\t padding-bottom: 40px; 
 
\t padding-right: 40px; 
 
} 
 

 
.preamble h3 { 
 
\t font-size: 40px; 
 
\t margin-left: 0px; 
 
\t margin-bottom: 20px; 
 
\t font-weight: lighter; 
 
} 
 

 
.preamble p { 
 
\t margin-top: 0; 
 
\t padding: 1%; 
 
\t font-family: sans-serif; 
 
\t font-size: 17px; 
 
\t line-height: 25px; 
 
\t margin: 0.5%; 
 
\t color: black; 
 
\t font-weight: lighter; 
 
} 
 

 
header { 
 
\t margin: 20px; 
 
} 
 

 
header h1 { 
 
\t background-color: #ea2e49; 
 
\t padding: 15px 15px; 
 
\t text-align: center; 
 
\t text-transform: uppercase; 
 
\t width: 280.05px; 
 
\t position: relative; 
 
\t top: 50px; 
 
\t left: 30px; 
 
\t font-size: 30px; 
 
\t font-family: 'tablet-gothic', sans-serif; 
 
\t font-style: normal; 
 
\t font-weight: 200; 
 
\t color: white; 
 
} 
 

 
header h2 { 
 
\t font-family: 'Coda Caption', sans-serif; 
 
\t color: white; 
 
\t letter-spacing: -7px; 
 
\t font-size: 110px; 
 
\t width: 700px; 
 
\t line-height: 1; 
 
\t position: relative; 
 
\t top: 0px; 
 
\t left: 30px; 
 

 
} 
 

 
.summary { 
 
\t width: 50%; 
 
\t position: relative; 
 
} 
 

 
.summary p { 
 
\t position: relative; 
 
\t left: 60px; 
 
\t letter-spacing: 2px; 
 
\t text-transform: uppercase; 
 
\t color: white; 
 
\t font-family: 'tablet-gothic', sans-serif; 
 
\t font-size: 18px; 
 

 
} 
 

 
.summary p:last-child { 
 
\t border-top: 1px solid #ea2e49; 
 
\t margin-top: 20px; 
 
\t padding-top: 25px; 
 
} 
 

 
.summary p:last-child a { 
 

 
} 
 

 
a { 
 
\t text-decoration: none; 
 
\t color: white; 
 
\t border-bottom: 1px solid rgba(0,0,0,0.2); 
 
\t transition: border-color 0.2s ease-in-out; 
 
} 
 

 
a:hover { 
 
\t border-bottom: 1px solid #ea2e49; 
 
} 
 

 
.select { 
 
\t font-size: 40px; 
 
\t font-weight: lighter; 
 
\t margin-top: 50px; 
 
\t margin-left: 33px; 
 
\t margin-bottom: 10px; 
 
\t text-align: inherit; 
 
} 
 

 
.design-selection ul { 
 
\t text-align: inherit; 
 
\t margin-top: 5px; 
 
\t margin-left: -5px; 
 
\t padding-right: 30px; 
 

 
} 
 
.design-selection li { 
 
\t font-size: 17px; 
 
\t line-height: 35px; 
 
\t color: rgba(0,0,0,0.2); 
 
} 
 

 
.design-selection li a { 
 
\t color: black; 
 
} 
 

 
.archives { 
 
\t font-size: 40px; 
 
\t font-weight: lighter; 
 
\t margin-top: 80px; 
 
\t margin-left: 33px; 
 
\t margin-bottom: 10px; 
 
\t text-align: inherit; 
 
} 
 

 
.design-archives ul { 
 
\t text-align: inherit; 
 
\t margin-top: 5px; 
 
\t margin-left: -5px; 
 
\t padding-right: 30px; 
 

 
} 
 
.design-archives li { 
 
\t font-size: 17px; 
 
\t line-height: 35px; 
 
\t color: rgba(0,0,0,0.2); 
 
} 
 

 
.design-archives li a { 
 
\t color: black; 
 
} 
 

 
.resources { 
 
\t font-size: 40px; 
 
\t font-weight: lighter; 
 
\t margin-top: 80px; 
 
\t margin-left: 33px; 
 
\t margin-bottom: 10px; 
 
\t text-align: inherit; 
 
} 
 

 
.zen-resources ul { 
 
\t text-align: inherit; 
 
\t margin-top: 5px; 
 
\t margin-left: -5px; 
 
\t padding-right: 30px; 
 
\t margin-bottom: 50px; 
 

 
} 
 
.zen-resources li { 
 
\t font-size: 17px; 
 
\t line-height: 35px; 
 
\t color: rgba(0,0,0,0.2); 
 
} 
 

 
.zen-resources li a { 
 
\t color: black; 
 
} 
 

 
.extra1 { 
 
\t position: fixed; 
 
\t z-index: 1; 
 
\t width: 30%; 
 
\t top: 0; 
 
\t right: 0; 
 
\t bottom: 0; 
 
\t background-color: rgba(51,55,69,0.9); 
 
} 
 

 
.main-supporting { 
 
\t display: block; 
 
\t position: relative; 
 
\t padding: 1%; 
 
} 
 

 
.explanation { 
 
\t display: block; 
 
\t position: relative; 
 
\t top: 253px; 
 
\t left: 80px; 
 
\t width: 39%; 
 
\t padding: 1%; 
 
} 
 

 
.explanation h3 { 
 
\t font-family: sans-serif; 
 
\t font-weight: lighter; 
 
\t color: white; 
 
\t margin-left: 5px; 
 
\t font-size: 30px; 
 
} 
 

 
.explanation p { 
 
\t padding: 1%; 
 
\t font-family: sans-serif; 
 
\t font-size: 17px; 
 
\t line-height: 25px; 
 
\t margin: 0.5%; 
 
\t color: white; 
 
\t font-weight: lighter; 
 

 
} 
 

 
.participation { 
 
\t display: block; 
 
\t position: relative; 
 
\t top: -265px; 
 
\t left: 600px; 
 
\t width: 35%; 
 
\t padding: 5%; 
 
\t background: rgba(234,46,73,0.9); 
 
\t z-index: 3; 
 
} 
 

 
.participation p { 
 
\t margin-top: 0; 
 
\t padding: 1%; 
 
\t color: white; 
 
\t line-height: 25px; 
 
\t font-family: sans-serif; 
 
\t font-size: 17px; 
 
} 
 

 
.participation a:hover { 
 
\t border-bottom: 1px solid white; 
 
} 
 

 
.participation h3 { 
 
\t font-family: sans-serif; 
 
\t font-size: 30px; 
 
\t color: white; 
 
\t margin left: 20px; 
 
\t margin-bottom: 10px; 
 
\t font-weight: lighter; 
 
} 
 

 
.benefits { 
 
\t display: block; 
 
\t position: relative; 
 
\t width: 15%; 
 
\t background: rgba(255,255,255,0.9); 
 
\t padding: 5%; 
 
\t top: -150px; 
 
\t left: 78px; 
 
} 
 

 
.benefits p { 
 
\t font-family: sans-serif; 
 
\t line-height: 25px; 
 
\t font-weight: lighter; 
 
\t font-size: 17px; 
 
} 
 

 
.benefits h3 { 
 
\t font-family: sans-serif; 
 
\t font-size: 25px; 
 
\t font-weight: lighter; 
 
} 
 

 
.requirements { 
 
\t display: block; 
 
\t background: rgba(255,255,255,0.9); 
 
\t width: 59%; 
 
\t position: relative; 
 
\t top: -833px; 
 
\t left: 381px; 
 
\t padding: 2%; 
 
} 
 

 
.requirements p { 
 
\t font-family: sans-serif; 
 
\t line-height: 25px; 
 
\t font-size: 17px; 
 
} 
 

 
.requirements p:first-child { 
 
\t margin: 50px 50px 20px 50px; 
 
} 
 

 
.requirements p:nth-child(2) { 
 
\t margin: 0px 50px 20px 50px; 
 
} 
 

 
.requirements p:nth-child(3) { 
 
\t margin: 0px 50px 20px 50px; 
 
} 
 

 
.requirements p:nth-child(4) { 
 
\t margin: 0px 50px 20px 50px; 
 
} 
 

 
.requirements p:nth-child(5) { 
 
\t margin: 0px 50px 20px 50px; 
 
\t padding-bottom: 3%; 
 
} 
 

 
.requirements p:nth-child(6) { 
 
\t margin: 0px 50px 40px 50px; 
 
\t padding-top: 5%; 
 
\t border-top: 1px solid #ea2e49; 
 
\t text-transform: uppercase; 
 
} 
 

 
.requirements h3 { 
 
\t margin: 50px 50px 10px 50px; 
 
\t font-family: sans-serif; 
 
\t font-size: 25px; 
 
\t font-weight: lighter; 
 

 
} 
 

 
.requirements a { 
 
\t color: black; 
 
} 
 

 
footer { 
 
\t position: relative; 
 
\t display: block; 
 
\t top: -834.5px; 
 
\t left: 60px; 
 
\t background: rgba(246,247,146,0.9); 
 
\t width: 45%; 
 
\t padding: 1.5%; 
 
\t margin-bottom: 0px; 
 
} 
 

 
footer a { 
 
\t color: black; 
 
\t margin-left: 3%; 
 
}
<!DOCTYPE html> 
 
<html lang="en"> 
 
<head> 
 
\t <meta charset="utf-8"> 
 
\t <title>CSS Zen Garden: The Beauty of CSS Design</title> 
 

 
\t <link rel="stylesheet" media="screen" href="style.css?v=8may2013"> 
 
\t <link rel="stylesheet" type="text/css" href="design.css"> 
 
\t <link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.csszengarden.com/zengarden.xml"> 
 
\t <link href="https://fonts.googleapis.com/css?family=Coda+Caption:800" rel="stylesheet"> 
 

 
\t <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
 
\t <meta name="author" content="Dave Shea"> 
 
\t <meta name="description" content="A demonstration of what can be accomplished visually through CSS-based design."> 
 
\t <meta name="robots" content="all"> 
 

 

 
\t <!--[if lt IE 9]> 
 
\t <script src="script/html5shiv.js"></script> 
 
\t <![endif]--> 
 
</head> 
 

 
<!-- 
 

 

 

 
\t View source is a feature, not a bug. Thanks for your curiosity and 
 
\t interest in participating! 
 

 
\t Here are the submission guidelines for the new and improved csszengarden.com: 
 

 
\t - CSS3? Of course! Prefix for ALL browsers where necessary. 
 
\t - go responsive; test your layout at multiple screen sizes. 
 
\t - your browser testing baseline: IE9+, recent Chrome/Firefox/Safari, and iOS/Android 
 
\t - Graceful degradation is acceptable, and in fact highly encouraged. 
 
\t - use classes for styling. Don't use ids. 
 
\t - web fonts are cool, just make sure you have a license to share the files. Hosted 
 
\t services that are applied via the CSS file (ie. Google Fonts) will work fine, but 
 
\t most that require custom HTML won't. TypeKit is supported, see the readme on this 
 
\t page for usage instructions: https://github.com/mezzoblue/csszengarden.com/ 
 

 
\t And a few tips on building your CSS file: 
 

 
\t - use :first-child, :last-child and :nth-child to get at non-classed elements 
 
\t - use ::before and ::after to create pseudo-elements for extra styling 
 
\t - use multiple background images to apply as many as you need to any element 
 
\t - use the Kellum Method for image replacement, if still needed. 
 
\t - don't rely on the extra divs at the bottom. Use ::before and ::after instead. 
 

 
\t \t 
 
--> 
 

 
<body id="css-zen-garden"> 
 
<div class="page-wrapper"> 
 

 
\t <section class="intro" id="zen-intro"> 
 
\t \t <header role="banner"> 
 
\t \t \t <h1>CSS Zen Garden</h1> 
 
\t \t \t <h2>The Beauty of <abbr title="Cascading Style Sheets">CSS</abbr> Design</h2> 
 
\t \t </header> 
 

 
\t \t <div class="summary" id="zen-summary" role="article"> 
 
\t \t \t <p>A demonstration of what can be accomplished through <abbr title="Cascading Style Sheets">CSS</abbr>-based design. Select any style sheet from the list to load it into this page.</p> 
 
\t \t \t <p>Download the example <a href="/examples/index" title="This page's source HTML code, not to be modified.">html file</a> and <a href="/examples/style.css" title="This page's sample CSS, the file you may modify.">css file</a></p> 
 
\t \t </div> 
 

 
\t \t <div class="preamble" id="zen-preamble" role="article"> 
 
\t \t \t <h3>The Road to Enlightenment</h3> 
 
\t \t \t <p>Littering a dark and dreary road lay the past relics of browser-specific tags, incompatible <abbr title="Document Object Model">DOM</abbr>s, broken <abbr title="Cascading Style Sheets">CSS</abbr> support, and abandoned browsers.</p> 
 
\t \t \t <p>We must clear the mind of the past. Web enlightenment has been achieved thanks to the tireless efforts of folk like the <abbr title="World Wide Web Consortium">W3C</abbr>, <abbr title="Web Standards Project">WaSP</abbr>, and the major browser creators.</p> 
 
\t \t \t <p>The CSS Zen Garden invites you to relax and meditate on the important lessons of the masters. Begin to see with clarity. Learn to use the time-honored techniques in new and invigorating fashion. Become one with the web.</p> 
 
\t \t </div> 
 
\t </section> 
 

 
\t <div class="main supporting" id="zen-supporting" role="main"> 
 
\t \t <div class="explanation" id="zen-explanation" role="article"> 
 
\t \t \t <h3>So What is This About?</h3> 
 
\t \t \t <p>There is a continuing need to show the power of <abbr title="Cascading Style Sheets">CSS</abbr>. The Zen Garden aims to excite, inspire, and encourage participation. To begin, view some of the existing designs in the list. Clicking on any one will load the style sheet into this very page. The <abbr title="HyperText Markup Language">HTML</abbr> remains the same, the only thing that has changed is the external <abbr title="Cascading Style Sheets">CSS</abbr> file. Yes, really.</p> 
 
\t \t \t <p><abbr title="Cascading Style Sheets">CSS</abbr> allows complete and total control over the style of a hypertext document. The only way this can be illustrated in a way that gets people excited is by demonstrating what it can truly be, once the reins are placed in the hands of those able to create beauty from structure. Designers and coders alike have contributed to the beauty of the web; we can always push it further.</p> 
 
\t \t </div> 
 

 
\t \t <div class="participation" id="zen-participation" role="article"> 
 
\t \t \t <h3>Participation</h3> 
 
\t \t \t <p>Strong visual design has always been our focus. You are modifying this page, so strong <abbr title="Cascading Style Sheets">CSS</abbr> skills are necessary too, but the example files are commented well enough that even <abbr title="Cascading Style Sheets">CSS</abbr> novices can use them as starting points. Please see the <a href="http://www.mezzoblue.com/zengarden/resources/" title="A listing of CSS-related resources"><abbr title="Cascading Style Sheets">CSS</abbr> Resource Guide</a> for advanced tutorials and tips on working with <abbr title="Cascading Style Sheets">CSS</abbr>.</p> 
 
\t \t \t <p>You may modify the style sheet in any way you wish, but not the <abbr title="HyperText Markup Language">HTML</abbr>. This may seem daunting at first if you&#8217;ve never worked this way before, but follow the listed links to learn more, and use the sample files as a guide.</p> 
 
\t \t \t <p>Download the sample <a href="/examples/index" title="This page's source HTML code, not to be modified.">HTML</a> and <a href="/examples/style.css" title="This page's sample CSS, the file you may modify.">CSS</a> to work on a copy locally. Once you have completed your masterpiece (and please, don&#8217;t submit half-finished work) upload your <abbr title="Cascading Style Sheets">CSS</abbr> file to a web server under your control. <a href="http://www.mezzoblue.com/zengarden/submit/" title="Use the contact form to send us your CSS file">Send us a link</a> to an archive of that file and all associated assets, and if we choose to use it we will download it and place it on our server.</p> 
 
\t \t </div> 
 

 
\t \t <div class="benefits" id="zen-benefits" role="article"> 
 
\t \t \t <h3>Benefits</h3> 
 
\t \t \t <p>Why participate? For recognition, inspiration, and a resource we can all refer to showing people how amazing <abbr title="Cascading Style Sheets">CSS</abbr> really can be. This site serves as equal parts inspiration for those working on the web today, learning tool for those who will be tomorrow, and gallery of future techniques we can all look forward to.</p> 
 
\t \t </div> 
 

 
\t \t <div class="requirements" id="zen-requirements" role="article"> 
 
\t \t \t <h3>Requirements</h3> 
 
\t \t \t <p>Where possible, we would like to see mostly <abbr title="Cascading Style Sheets, levels 1 and 2">CSS 1 &amp; 2</abbr> usage. <abbr title="Cascading Style Sheets, levels 3 and 4">CSS 3 &amp; 4</abbr> should be limited to widely-supported elements only, or strong fallbacks should be provided. The CSS Zen Garden is about functional, practical <abbr title="Cascading Style Sheets">CSS</abbr> and not the latest bleeding-edge tricks viewable by 2% of the browsing public. The only real requirement we have is that your <abbr title="Cascading Style Sheets">CSS</abbr> validates.</p> 
 
\t \t \t <p>Luckily, designing this way shows how well various browsers have implemented <abbr title="Cascading Style Sheets">CSS</abbr> by now. When sticking to the guidelines you should see fairly consistent results across most modern browsers. Due to the sheer number of user agents on the web these days &#8212; especially when you factor in mobile &#8212; pixel-perfect layouts may not be possible across every platform. That&#8217;s okay, but do test in as many as you can. Your design should work in at least IE9+ and the latest Chrome, Firefox, iOS and Android browsers (run by over 90% of the population).</p> 
 
\t \t \t <p>We ask that you submit original artwork. Please respect copyright laws. Please keep objectionable material to a minimum, and try to incorporate unique and interesting visual themes to your work. We&#8217;re well past the point of needing another garden-related design.</p> 
 
\t \t \t <p>This is a learning exercise as well as a demonstration. You retain full copyright on your graphics (with limited exceptions, see <a href="http://www.mezzoblue.com/zengarden/submit/guidelines/">submission guidelines</a>), but we ask you release your <abbr title="Cascading Style Sheets">CSS</abbr> under a Creative Commons license identical to the <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="View the Zen Garden's license information.">one on this site</a> so that others may learn from your work.</p> 
 
\t \t \t <p role="contentinfo">By <a href="http://www.mezzoblue.com/">Dave Shea</a>. Bandwidth graciously donated by <a href="http://www.mediatemple.net/">mediatemple</a>. Now available: <a href="http://www.amazon.com/exec/obidos/ASIN/0321303474/mezzoblue-20/">Zen Garden, the book</a>.</p> 
 
\t \t </div> 
 

 
\t \t <footer> 
 
\t \t \t <a href="http://validator.w3.org/check/referer" title="Check the validity of this site&#8217;s HTML" class="zen-validate-html">HTML</a> 
 
\t \t \t <a href="http://jigsaw.w3.org/css-validator/check/referer" title="Check the validity of this site&#8217;s CSS" class="zen-validate-css">CSS</a> 
 
\t \t \t <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="View the Creative Commons license of this site: Attribution-NonCommercial-ShareAlike." class="zen-license">CC</a> 
 
\t \t \t <a href="http://mezzoblue.com/zengarden/faq/#aaa" title="Read about the accessibility of this site" class="zen-accessibility">A11y</a> 
 
\t \t \t <a href="https://github.com/mezzoblue/csszengarden.com" title="Fork this site on Github" class="zen-github">GH</a> 
 
\t \t </footer> 
 

 
\t </div> 
 

 

 
\t <aside class="sidebar" role="complementary"> 
 
\t \t <div class="wrapper"> 
 

 
\t \t \t <div class="design-selection" id="design-selection"> 
 
\t \t \t \t <h3 class="select">Select a Design:</h3> 
 
\t \t \t \t <nav role="navigation"> 
 
\t \t \t \t \t <ul> 
 
\t \t \t \t \t <li> 
 
\t \t \t \t \t \t <a href="/221/" class="design-name">Mid Century Modern</a> by \t \t \t \t \t \t <a href="http://andrewlohman.com/" class="designer-name">Andrew Lohman</a> 
 
\t \t \t \t \t </li> \t \t \t \t \t <li> 
 
\t \t \t \t \t \t <a href="/220/" class="design-name">Garments</a> by \t \t \t \t \t \t <a href="http://danielmall.com/" class="designer-name">Dan Mall</a> 
 
\t \t \t \t \t </li> \t \t \t \t \t <li> 
 
\t \t \t \t \t \t <a href="/219/" class="design-name">Steel</a> by \t \t \t \t \t \t <a href="http://steffen-knoeller.de" class="designer-name">Steffen Knoeller</a> 
 
\t \t \t \t \t </li> \t \t \t \t \t <li> 
 
\t \t \t \t \t \t <a href="/218/" class="design-name">Apothecary</a> by \t \t \t \t \t \t <a href="http://trentwalton.com" class="designer-name">Trent Walton</a> 
 
\t \t \t \t \t </li> \t \t \t \t \t <li> 
 
\t \t \t \t \t \t <a href="/217/" class="design-name">Screen Filler</a> by \t \t \t \t \t \t <a href="http://elliotjaystocks.com/" class="designer-name">Elliot Jay Stocks</a> 
 
\t \t \t \t \t </li> \t \t \t \t \t <li> 
 
\t \t \t \t \t \t <a href="/216/" class="design-name">Fountain Kiss</a> by \t \t \t \t \t \t <a href="http://jeremycarlson.com" class="designer-name">Jeremy Carlson</a> 
 
\t \t \t \t \t </li> \t \t \t \t \t <li> 
 
\t \t \t \t \t \t <a href="/215/" class="design-name">A Robot Named Jimmy</a> by \t \t \t \t \t \t <a href="http://meltmedia.com/" class="designer-name">meltmedia</a> 
 
\t \t \t \t \t </li> \t \t \t \t \t <li> 
 
\t \t \t \t \t \t <a href="/214/" class="design-name">Verde Moderna</a> by \t \t \t \t \t \t <a href="http://www.mezzoblue.com/" class="designer-name">Dave Shea</a> 
 
\t \t \t \t \t </li> \t \t \t \t \t </ul> 
 
\t \t \t \t </nav> 
 
\t \t \t </div> 
 

 
\t \t \t <div class="design-archives" id="design-archives"> 
 
\t \t \t \t <h3 class="archives">Archives:</h3> 
 
\t \t \t \t <nav role="navigation"> 
 
\t \t \t \t \t <ul> 
 
\t \t \t \t \t \t <li class="next"> 
 
\t \t \t \t \t \t \t <a href="/214/page1"> 
 
\t \t \t \t \t \t \t \t Next Designs <span class="indicator">&rsaquo;</span> 
 
\t \t \t \t \t \t \t </a> 
 
\t \t \t \t \t \t </li> 
 
\t \t \t \t \t \t <li class="viewall"> 
 
\t \t \t \t \t \t \t <a href="http://www.mezzoblue.com/zengarden/alldesigns/" title="View every submission to the Zen Garden."> 
 
\t \t \t \t \t \t \t \t View All Designs \t \t \t \t \t \t \t </a> 
 
\t \t \t \t \t \t </li> 
 
\t \t \t \t \t </ul> 
 
\t \t \t \t </nav> 
 
\t \t \t </div> 
 

 
\t \t \t <div class="zen-resources" id="zen-resources"> 
 
\t \t \t \t <h3 class="resources">Resources:</h3> 
 
\t \t \t \t <ul> 
 
\t \t \t \t \t <li class="view-css"> 
 
\t \t \t \t \t \t <a href="style.css" title="View the source CSS file of the currently-viewed design."> 
 
\t \t \t \t \t \t \t View This Design&#8217;s <abbr title="Cascading Style Sheets">CSS</abbr> \t \t \t \t \t \t </a> 
 
\t \t \t \t \t </li> 
 
\t \t \t \t \t <li class="css-resources"> 
 
\t \t \t \t \t \t <a href="http://www.mezzoblue.com/zengarden/resources/" title="Links to great sites with information on using CSS."> 
 
\t \t \t \t \t \t \t <abbr title="Cascading Style Sheets">CSS</abbr> Resources \t \t \t \t \t \t </a> 
 
\t \t \t \t \t </li> 
 
\t \t \t \t \t <li class="zen-faq"> 
 
\t \t \t \t \t \t <a href="http://www.mezzoblue.com/zengarden/faq/" title="A list of Frequently Asked Questions about the Zen Garden."> 
 
\t \t \t \t \t \t \t <abbr title="Frequently Asked Questions">FAQ</abbr> \t \t \t \t \t \t </a> 
 
\t \t \t \t \t </li> 
 
\t \t \t \t \t <li class="zen-submit"> 
 
\t \t \t \t \t \t <a href="http://www.mezzoblue.com/zengarden/submit/" title="Send in your own CSS file."> 
 
\t \t \t \t \t \t \t Submit a Design \t \t \t \t \t \t </a> 
 
\t \t \t \t \t </li> 
 
\t \t \t \t \t <li class="zen-translations"> 
 
\t \t \t \t \t \t <a href="http://www.mezzoblue.com/zengarden/translations/" title="View translated versions of this page."> 
 
\t \t \t \t \t \t \t Translations \t \t \t \t \t \t </a> 
 
\t \t \t \t \t </li> 
 
\t \t \t \t </ul> 
 
\t \t \t </div> 
 
\t \t </div> 
 
\t </aside> 
 

 

 
</div> 
 

 
<!-- 
 

 
\t These superfluous divs/spans were originally provided as catch-alls to add extra imagery. 
 
\t These days we have full ::before and ::after support, favour using those instead. 
 
\t These only remain for historical design compatibility. They might go away one day. 
 
\t \t 
 
--> 
 
<div class="extra1" role="presentation"></div><div class="extra2" role="presentation"></div><div class="extra3" role="presentation"></div> 
 
<div class="extra4" role="presentation"></div><div class="extra5" role="presentation"></div><div class="extra6" role="presentation"></div> 
 

 
</body> 
 
</html>

Как вы можете видеть в фрагменте кода, есть дополнительное место после того, как содержание.

Мне нужна помощь в этом.

Thank you.

+1

Вы злоупотребляете верхней частью, чтобы компенсировать неправильное использование позиций. Если вы их удалите, вы увидите, как все сидит на дне. Обычно переполнение: скрытое с некоторым дополнением поможет, но слишком много невидимых кадров div ниже. –

+0

@norcaljohnny Да. Я бы это признал. Свойство позиции меня смущает. Раньше я устанавливал 'page-wrapper' в относительный и начинал позиционировать элементы с помощью' absolute', но содержимое внизу начало выходить из контейнера. Кроме того, iI не может настроить html, это условие, поэтому не может ничего сделать о невидимых кадрах div, –

+0

Насколько я понимаю, это может запутать. Похоже, что в модели код много полагается на float и @media, чтобы изменить размеры всех строк на меньших ширинах. Ответы ниже могут помочь, но это не решит вашу отзывчивую сторону вещей. –

ответ

1

Есть postives и негативы при использовании относительного положения в этой схеме ..

Посмотрите на снимок ниже enter image description here

вашего DIV с идентификатором zen-requirements был относительным располагаются в макете и есть top: -833px;. выньте эту вершину, и вы заметите, что начальная позиция div занимает то пространство, от которого вы пытаетесь избавиться (не забывая немного места где-нибудь) .....

hmmmm .... Придерживаться этой layout..I верю, что вы должны изменить размер вашего DIV, который имеет класс page-wrapper (добавить id, чтобы избежать других классов под воздействием)
Добавить эти правила ид ..

height: 3000px; 
overflow:hidden 

Подход Javascript для поиска вычисленной позиции последнего желтого нижнего колонтитула относительно окна top и автоматической настройки размера окна могут работать ...

+1

Спасибо. Это сработало. –

0

html{ padding: 5%} - причина. Это делает дополнительное пространство и в нижней части.

Вы можете установить его как: html{padding: 5% 5% 0 5%}

enter image description here

Редактировать Если вы, также, означает дополнительное пространство в синий цвет под навигации содержит, HTML, CSS, ... вы можете также регулировать отступы div.main:

div.main { 
    padding: 5% 5% 0 5%; 
} 

быть как показано на следующем скриншоте:

enter image description here

+0

это не сработало. –

+0

@AyushBahuguna Как он не мог работать? Пожалуйста, проверьте скриншот, прикрепленный к ответу. – SaidbakR

+0

https://snag.gy/8uj1Cc.jpg это не сработало. –

0

Если добавить фиксированный размер в контейнере, он может исправить эту проблему, но в целом ваш проект отличается от образца вы показаны. Попробуйте это:

#zen-supporting { 
    height: 1750px; 
} 
Смежные вопросы