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 trialMary Voigt
6,591 Pointsfloat not working in Chrome for Mac
When I use the css rule ...
.main-nav li { float-left; }
... to float the list items on one line it does not work in Mac Chrome Version 74.0.3729.169.
It looks exactly the same as it did before I added the .main-nav li rule.
2 Answers
KRIS NIKOLAISEN
54,971 PointsTry
.main-nav li {
float: left;
}
with a colon instead of a dash
Austin Veatch
Front End Web Development Techdegree Graduate 19,964 PointsPerhaps you didn't place .main-nav li in the Media Query?
Mary Voigt
6,591 PointsMary Voigt
6,591 PointsI actually typed it in wrong in the question. I did use a colon ...
.main-nav li { float: left; }
I downloaded the project files and previewed the index.html locally and it worked. I copied the css from the project file and pasted it into my workspace and it finally worked. Not sure what happened. I checked my css in my workspace several times to make sure I had the right syntax prior to pasting the project file css and it was correct. It wasn't just Chrome, it didn't work in any browser.