Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Gennadii Chamorsov
Gennadii Chamorsov
9,207 Points

h1 "Scoreboard" is rendered in the middle of the screen, not on the right side like in the video lesson

Hers is my code:

function Header () {
  return (
    <header>
      <h1>Scoreboard</h1>
      <span className="stats">Players: 1</span>
    </header>
  );
}

ReactDOM.render (
  <Header />,
  document.getElementById('root')
);

1 Answer

Hi Gennadii,

My guess is that maybe there is a class that causes the h1 element to display on the right side of the window, but what you've posted is not quite enough to determine the reasoning.

If you wouldn't mind posting a link to your repo, that way we can see and run this code within the proper context of the rest of the files.