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 triallucas klaas
1,012 Pointscard-title class the css rules won't take effect after i refresh the browser
hi after creating the class card-title and added the styling, the changes won't take effect on my browser
12 Answers
Agnes Demes
6,613 Pointsthats ok, my pleasure ... I think here the code editor needed help :) have a great day
Agnes Demes
6,613 Pointseverything seems fine, hmmmm I just went and tired myself to do the same and it worked. The only thing I can really think of is - not saving the file by SAVE ALL but SAVE only the current page would cause this.
Jason Mendez
6,630 PointsThis comment worked for me. I had a similar issue, and what I've concluded is that simply using "Save" while on styles.css only saved the code on styles.css, but not the work I'd done on index.html, so I believe the code on styles.css wasn't being applied to the new html code when I refreshed. After using "Save All" instead, it worked perfectly.
Joy Manuel
6,464 PointsThanks for SAVE ALL. It SAVED ME!
Jelena Feliciano
Full Stack JavaScript Techdegree Student 12,729 PointsWow!!! That worked. I was stressing myself thinking I was doing something wrong.
Christian Gonzalez
418 PointsThank you! save all worked for me
Stacey Norrington
1,960 PointsSave All worked for me. Super grateful!!!
lucas klaas
1,012 Pointshi agnes thank you very much for the speedy response. please find below, the copy of mu html and css .card-title { text-align: center; border: solid black 3px; border-radius: 10px; }
<main class="flex">
<div class="card">
<h2 class="card-title">Background</h2>
lucas klaas
1,012 Pointsmy thought exactly agnes, it seems all my class attributes don't work, because i tried to remove the classes and styled just the tag, and guess what? when i ran the browser , the styling worked. it's getting me worried. But on a positive note, i seem to be getting all the questions about classes right.
Agnes Demes
6,613 PointsHi, sometimes it does take a little longer then expected for some browsers to catch up. Things you can try, save all changes in files, re-launch preview and check css file that the dot . is infront of card-title. If you are still having trouble please post a copy of your html and css code .
Agnes Demes
6,613 Pointsdo you have another code editor where you can try it as well? try getting atom or a free version of visual studio. Yes your code seem good and if you getting all the answers right then or try the h2.card-title{} specific taget style.
lucas klaas
1,012 Pointsyes i do have atom, everything loads very well with it. perhaps, the problem could be with the workspace. thank you agnes for helping me.
lucas klaas
1,012 Pointsthank you, enjoy your day.
chris Wrangles
585 PointsI'm having the same problem
Lauren Niedergang
1,337 PointsHitting "Save All" instead of "Save" worked for me.
leonardo abreu
535 PointsThanks it work for me also!!
David Lloyd
2,800 PointsNot working for me either.
.card-title { text-align: center; border: solid black 3pc; }
<main class="flex"> <div class="card"> <h2 class="card-title">Background</h2>
sophiajackson
6,642 PointsHello, Im having the same problem. I cannot get it to center
xffervapbo
627 PointsThe "Save All" comment worked for me too. Ahhhhh crisis averted :)
Alexis Luescher
7,459 PointsAlexis Luescher
7,459 PointsThank you, Agnes! I was having the same issue and voila! I was able to refresh and "Background" was centered.