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 Making the Game Interactive playToken() Method Solution

Stu Finn
Stu Finn
3,427 Points

Game pieces don't line up properly with the columns on the game board

Is anyone else finding that the game pieces don't line up properly with the columns on the game board? I tried the code that's in the provided project files and I'm finding the same issue.

Gari Merrifield
Gari Merrifield
9,597 Points

I have not done that course, but I have found that some of these kinds of things happen with different browsers, Firefox being the most common one. Have you tried a couple of different browsers and had the same results?

Stu Finn
Stu Finn
3,427 Points

Gari, that is exactly the issue. I should have known to check in another browser. Thanks!

Deepa Gowda
Deepa Gowda
4,941 Points

I'm executing in Chrome browser and it works fine.

Stu Finn
Stu Finn
3,427 Points

Thanks Deepa - yep, the issue was only in Firefox (developer edition) but Chrome works great.

Same for me, Chrome works fine, but it's completely bugged in Firefox.

3 Answers

Kamaal Farah
Kamaal Farah
15,373 Points

Try fully opening the window, it seems to align correctly if I do that.

Matthew McQuain
Matthew McQuain
14,184 Points

I think Kamaal is correct. When I had the Chrome browser window at 25% of its normal width, the Token did not line up correctly. When I full screened the browser, everything lined up correctly. I think the solution is the CSS code posted above by Ryan.

Ryan Gaspar
Ryan Gaspar
20,200 Points

fixed this with, in the style.css:

  • under #game-board-underlay, delete the line "box-sizing: border-box"
  • under .token, add "left: 16px;"
Stu Finn
Stu Finn
3,427 Points

@garimerrifield and @deepashrichannegowda had it - doesn't work well for me in Firefox but works fine in Chrome.