Add some flair to your elements by styling them with various background options such as colors, images, and more.
Check out the CSS snippet below:
body { /* Set red background */
background: #990000;
}
#outer { /* Create a white box */
background: #ffffff; /* White */
width: 900px; /* Adjust total width to be 1000px with padding */
padding: 50px; /* Creates a white border around the black box on all sides */
margin: 0 auto; /* Center the box horizontally */
}
#inner { /* This is the black box */
background: #000000; /* Black */
color: #ffffff; /* White text for visibility */
}
Incorporate the following HTML into your page structure:
<html>
<head>
<title>My Stylish Page</title>
</head>
<body>
<div id="outer">
<div id="inner">
Your Content Goes Here!
</div>
</div>
</body>
</html>