Tell us what’s happening:
Describe your issue in detail here.
i’d like to know how to put my text in the white background ,just like the given example ![]()
i’ve tried to adjust the div’s height,but it always skip my text ,
here is my div{background-color:white;
height:450px;}
i’m not good at coding
please help me(screaming)
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="styles.css">
<title>tribute-page</title>
</head>
<main id="main">
<h1 id="title">Dr. Norman Borlaug</h1>
<h2>The man who saved a billion lives</h2>
<div id="img-div">
<img id="img-caption" src="https://cdn.freecodecamp.org/testable-projects-fcc/images/tribute-page-main-image.jpg">
<p>Dr. Norman Borlaug, third from the left, trains biologists in Mexico on how to increase wheat yields - part of his life-long war on hunger.</p>
</div>
</main>
</html>
/* file: styles.css */
*{background-color:rgb(230,230,230)}
h1,h2{text-align:center}
h1{margin-bottom:10px}
h2{font-weight:normal;
font-size:16px;
margin-top:0;}
img{width:95%;
margin-left:15px;
margin-right:}
div{background-color:white;
height:450px;}
p{text-align:center;}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.52
Challenge: Tribute Page - Build a Tribute Page
Link to the challenge: