Having an issue with my code!

I’m having an issue with my css, as you can see there is some kind of background around my text, can’t figure it out how to fix it.


I have pasted my code below.

{Complete CSS}

*{
  margin: auto;
  font-family: Noto Sans;
  padding:10px;
  background-color: grey;
  }

#page-data{
  width: 60%;
  background-color:white;
}
footer{
  text-align:center;
}
h2{
  padding:1px;
  text-align: center;
  text-shadow:4px 4px 20px;
  font-family: Noto Sans;
}

h4{
  padding:10px;
  text-align: center;
  text-shadow:4px 4px 20px;
}

/* #image{
  max-width:100%;
  height:auto;
  margin:auto;
  display:block;
  text-align: center;
} */

[ Complete HTML]

<!-- Head -->
<head>
    <link rel="stylesheet" href="styles.css">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@100;500&display=swap" rel="stylesheet">
    <title id="title">
     <h1>Dr. Norman Borlaug</h1>
     </title>
     </div>
</head>
<main id="main">

            <div id="img-div">
                <img id="image" max-width="300px" height="80px" align="center">
                <figcaption id="img-caption">
                <h2>Dr.Nouman</h2>
                </figcaption>
                </div>

<!-- Body -->
<body>
    
    <div id="tribute-info">
     <p id="page-data">
        <ul>
        <li><b>1914</b> - Born in Cresco, Iowa</li>
        <li><b>1933</b> - Leaves his family's farm to attend the University of Minnesota, thanks to a Depression era program known as the "National Youth Administration"</li>
        <li><b>1935</b> - Has to stop school and save up more money. Works in the Civilian Conservation Corps, helping starving Americans. "I saw how food changed them", he said. "All of this left scars on me."</li>
        <li><b>1938</b> - Marries wife of 69 years Margret Gibson. Gets laid off due to budget cuts.Inspired by Elvin Charles Stakman, he returns to school study under Stakman, who teaches him about breeding pest-resistent plants.</li>
        <li><b>1941</b> - Tries to enroll in the military after the Pearl Harbor attack, but is rejected.
                        Instead,
                        the military asked his lab to work on waterproof glue, DDT to control malaria, disinfectants,
                        and other applied science.</li>
                    <li><b>1942</b> - Receives a Ph.D. in Genetics and Plant Pathology</li>
                    <li><b>1944</b> - Rejects a 100% salary increase from Dupont, leaves behind his pregnant wife, and
                        flies to
                        Mexico to head a new plant pathology program. Over the next 16 years, his team breeds 6,000
                        different strains of disease resistent wheat - including different varieties for each major
                        climate on Earth.</li>
                    <li><b>1953</b> - crosses a short, sturdy dwarf breed of wheat with a high-yeidling American breed,
                        creating a strain that responds well to fertilizer. It goes on to provide 95% of Mexico's wheat.
                    </li>
                    <li><b>1962</b> - Visits Delhi and brings his high-yielding strains of wheat to the Indian
                        subcontinent in
                        time to help mitigate mass starvation due to a rapidly expanding population</li>
                    <li><b>1970</b> - receives the Nobel Peace Prize</li>
                    <li><b>1983</b> - helps seven African countries dramatically increase their maize and sorghum yields
                    </li>
                    <li><b>2005</b> - states "we will have to double the world food supply by 2050." Argues that
                        genetically
                        modified crops are the only way we can meet the demand, as we run out of arable land. Says that
                        GM crops are not inherently dangerous because "we've been genetically modifying plants and
                        animals for a long time. Long before we called it science, people were selecting the best
                        breeds."</li>
    <li><b>2009</b> - dies at the age of 95.</li>
    </p>
    </div>
    <br>
    <p>
    <i><q>Borlaug's life and achievement are testimony to the far-reaching contribution that one man's towering intellect, persistence and scientific vision can make to human peace and progress.</q>
<br>~Indian Prime Minister Manmohan Singh.</p>
</div>
<main>
</body>

<!-- Footer -->
    <footer>
<p><a href="https://tribute-page.freecodecamp.rocks/" target="_blank" id="tribute-link">Link to out side world </a></p>
    <br>
         <h4><q>If you have time, you should read more about this incredible human being on his Wikipedia entry.</h4>
    </footer>```

It’s hard to tell what is being applied to what without seeing the html. I’m guessing it is some kind of a line-height issue, but I could be wrong.

Please provide the relevant HTML and all the css.

provided, please check the updated code.

I don’t do much web, but…

It seems weird to me to do a <br> in the middle of a p. Paragraphs don’t have internal line breaks, that’s what makes them paragraphs. And why is a q wrapped in a p? Make up your mind, is it a paragraph or an inline quote. And why does the final line have an open q but no close - and it’s not even a quote.

I would simplify these. I would use q for quote and create a class to handle the the quote, but really, blockquote might be better, more what you’re after. And the final line is not a quote, remove the q. And just semantically, I wouldn’t consider the final line as part of a footer, I’d move it above the footer - but that is subjective.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.