html5 - How do I remove the white between border and my content? -
i have been @ while, here html , css kind of simplified. i'm sure it's simple cant figure out life of me. need remove white space in between border , content.
<!doctype html> <html lang="en-us"> <head> <!--css internal style sheet--> <style> html { border: 20px solid gray; margin: auto; } #center { background-color: #eee8aa; padding: 0; } p { text-align: left; margin-left: auto; margin-right: auto; padding: inherit; width: 800px; } dl { text-align: left; margin-left: auto; margin-right: auto; top-padding: 10px; height: 500px; width: 800px; } .box { background-color: #dcdcdc; border: 1px solid #666; padding: 5px; } #banner { position: relative; top: 0px; left: 0px; right: 0px; width: 100%; height: 200px; background-image: url(file:///c:/users/tollis/documents/website/banner.png) } header { text-align: center; font-size: 50px; padding: 0; background-color: #98fb98; } .menu { text-align: center; padding-bottom: 30px; padding-top: 30px; background-color: #98fb98; } ul { list-style-type: none; margin: 0; padding: 0; } li { display: inline; } </style> <title> module 1 activity </title> </head> <body> <header> module 1 activity </header> <!--navigation bar--> <div class="menu"> <ul> <li> <a href="page1.htm"> page 1 </a> </li>     <li> <a href="page2.htm"> page 2 </a> </li>     <li> <a href="page3.htm"> page 3 </a> </li>     <li> <a href="page4.htm"> page 4 </a> </li> </ul> <div id="center"> <hr> <p class="box" text-align="center"> <i> <b> statement: </b> if students allowed utilize technology such computers, calculators , tablets, able develop deeper understanding of math concepts presented within course. </i> </p> <hr> <h2 class="back" align="center"> part 1 </h2> <p> <b> inverse: </b> if students not allowed utilize technology such computers, calculators , tablets, not able develop deeper understanding of math concepts presented within course.</p> <br> <hr> </div> </body> <footer> <p> created by: tollis hunt </p> <p> contact information: <a href="mailto:example@gmail.com"> email me! </a></p> <br> </footer>
try in css:
body { margin:0; padding:0; }
this remove white space between content , border. hope helps.
demo
html5 css3
No comments:
Post a Comment