Slinp Slinp - 1 month ago 14
CSS Question

Heading mixing/floating next to paragraph

Trying to do a school project and doing several headings to make the text after the paragraphs stand out but the secondheading keeps mixing in with the first paragraphs under heading 1

<h1>Nvidia</h1>
<p>For more than two decades, NVIDIA has pioneered visual computing, the art and science of computer graphics.
</p>
<p>With a singular focus on this field, they offer specialized platforms for the gaming, professional visualization, data center and automotive markets.
</p>
<p>Their work is at the center of the most consequential mega-trends in technology - virtual reality, artificial intelligence and self-driving cars.
</p>


<h2>THE WORLD LEADER IN VISUAL COMPUTING</h2>
<p>NVIDIA are vertically integrated and bring together GPUs, system software, algorithms, systems and services to create unique value for the markets They serve.</p>
p {
font-family: "Calibri";
margin: 10px 10px 2px 10px;
float: left;
font-size: 140%;
color:ghostwhite;
}

h2 {
text-align: center;
font-family: Calibri;
color: #76b900;
margin: 3%;
}

h1 {
color: #76b900;
text-align: center;
font-family: "Calibri";
margin: 3%;
}

Answer

Basically I want to make one heading followed by a paragraph under it, then under that paragraph another heading and another paragraph followed under it

Just remove the float from the paragraphs.

p {
  font-family: "Calibri";
  margin: 10px 10px 2px 10px;
  font-size: 140%;
  color: grey;
}
h2 {
  text-align: center;
  font-family: Calibri;
  color: #76b900;
  margin: 3%;
}
h1 {
  color: #76b900;
  text-align: center;
  font-family: "Calibri";
  margin: 3%;
}
<h1>Nvidia</h1>
<p>For more than two decades, NVIDIA has pioneered visual computing, the art and science of computer graphics.
</p>
<p>With a singular focus on this field, they offer specialized platforms for the gaming, professional visualization, data center and automotive markets.
</p>
<p>Their work is at the center of the most consequential mega-trends in technology - virtual reality, artificial intelligence and self-driving cars.
</p>


<h2>THE WORLD LEADER IN VISUAL COMPUTING</h2>
<p>NVIDIA are vertically integrated and bring together GPUs, system software, algorithms, systems and services to create unique value for the markets They serve.</p>

Comments