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

JavaScript Object-Oriented JavaScript: Challenge Rendering the Game startGame() Method Solution

Will Albertsen
Will Albertsen
13,155 Points

How exactly is that first token positioned on the screen?

I'm just curious as to how exactly that first token is positioned on the game board. It looks like it is originally positioned to fill the space in the top left corner and then moved up (top: -50px in the token class). So how was it positioned in that top left space? Did it have anything to do with this snippet of html?

<div id = "token" data-column = "0">

Or was it just the absolute positioning in the .token class?

Thanks in advance for clarifying!

1 Answer

Akshay Alok
Akshay Alok
7,857 Points

Check the token class' CSS property in .token{} in style.css. It has a property called 'top' with a value of -50px, try changing that value and see how that affects the rendering of the initial token. Also try adding another property, say 'left' with a value of 50px and see how that affects the rendered token.