css - How do I remove the margin on the bottom 2 divs on my basic HTML site? -
below code site. trying figure out why there right margin on bottom 2 divs when .jumbotron has width of 100%.
<head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link href="main.css" rel="stylesheet"/> <title>vasilios lambos</title> </head> <body> <header role="banner"> <div id="fixed"> <nav role="navigation"> <ul> <li><a href="home.html">home</a></li> <li><a href="portfolio.html">portfolio</a></li> <li><a href="process.html">process</a></li> <li><a href="https://www.linkedin.com/in/vasilios-lambos-81220366">contact</a></li> </ul> </nav> </div> </header> <div class="jumbotron"> <img src="img_1677.jpg" width="200" height="200"/> <h1>vaslios lambos</h1> <p>industrial , interaction designer</p> <p>always staying hungry learn new , inspiring ways improve creative process. utilize design thinking, research methods, , ethonography explore user experience , services. core hard skills consist of user interface design, product rendering, , testing.</p> </div> <div class="pics"> <img src="vl-logo.png" width="200" height="200"/> </div> <div class="info"> <div class="container"> <h3>overview</h3> <p> ### </p> </div> </div> <div class="footer"> <h3>soft & hard skills</h3> <ul> <li>adobe suite</li> <li>axure rp</li> <li>html/css/javascript</li> </ul> </div> </body> </html>
notice css jumbotron in 100% , both info div , footer have margin on right when previewed in browser.
@charset "utf-8"; @font-face { font-family: verdana, geneva, sans-serif; } body { font-family:verdana, geneva, sans-serif; background-color: #fff; } *{margin:0;padding:0;} #fixed ul{ position:fixed; top:0px; width:100%; z-index:9999; list-style-type:none; margin: 0; padding: 0; overflow:hidden; background-color: #fff; } nav li{ float:left; } nav li a{ display:block; color: #000; font-size: 11px; font-weight: bold; padding:20px; text-transform:uppercase; text-decoration:none; } nav a:hover { background-color: orange; } div.jumbotron { margin-top:80px; margin-left:auto; margin-right:auto; padding:10px; height:500px; width:100%; color:white; text-align:center; background-color:#000 } .jumbotron p{ width:500px; margin-left:inherit; margin-right:inherit; } .jumbotron img { border-radius: 50%; } .pics{ display:inline; height:232px; width:232px; padding:0; margin:0; } .pics img{ padding:15px; border:1px solid #ccc; background-color: #eee; width:200px; height:200px; } div.info { background-color: #000; color:white; padding:20px; height:400px; } div.footer{ background-color:#000; color:white; clear:both; height:400px; padding:20px; }
html ok
css followed /* -------------- added */
change
here css
@font-face { font-family: verdana, geneva, sans-serif; } body { font-family: verdana, geneva, sans-serif; background-color: #fff; } * { margin: 0; padding: 0; } #fixed ul { position: fixed; top: 0px; width: 100%; z-index: 9999; list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #fff; } nav li { float: left; } nav li { display: block; color: #000; font-size: 11px; font-weight: bold; padding: 20px; text-transform: uppercase; text-decoration: none; } nav a:hover { background-color: orange; } div.jumbotron { margin-top: 80px; margin-left: auto; margin-right: auto; padding: 10px; height: 500px; width: 100%; color: white; text-align: center; background-color: #000; box-sizing: border-box; -------------- added */ } .jumbotron p { width: 500px; margin-left: inherit; margin-right: inherit; } .jumbotron img { border-radius: 50%; } .pics { display: inline; height: 232px; width: 232px; padding: 0; margin: 0; } .pics img { padding: 15px; border: 1px solid #ccc; background-color: #eee; width: 200px; height: 200px; } div.info { background-color: #000; color: white; padding: 20px; height: 400px; width: 100%; /* ------------ added */ box-sizing: border-box; /* -------------- added */ } div.footer { background-color: #000; color: white; clear: both; height: 400px; padding: 20px; width: 100%; /* -------------- added */ box-sizing: border-box; /* -------------- added */ }
Comments
Post a Comment