Social Icons

Pages

Tuesday, November 29, 2016

CSS Positioning 12/25

Review
Cool, right? You can move HTML elements clear off the page with negative margins values.
Time for a quick review to make sure you've got a handle on all this margin and padding stuff!


Instructions
We've put a <div> for you to use on the HTML tab. On the CSS tab:
  1. Give that div a border of 1px solid black.
  2. Give it a background color of #CC0000.
  3. Set its top margin to 10px, its right margin to 5px, its bottom margin to 5px, and its left margin to 50px.
  4. Set its top padding to 0px, its right padding to 30px, its bottom padding to 0px, and its left padding to 10px.

/*Add your CSS below!*/

 div {
 border: 1px solid black;
 background-color:#CC0000;
 border-radius: 5px; 
 margin-top:10px;
 margin-right:5px;
 margin-bottom:5px;
 margin-left:50px;
 padding-top:0px;
 padding-right:30px;
 padding-bottom:0px;
 padding-left:10px;
 

}

<!DOCTYPE html>
<html>
 <head>
  <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
  <title>Result</title>
 </head>
 <body>
  <div></div>
 </body>

</html>

No comments:

Post a Comment