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
Guta Geani
373 PointsDiv's problem
I can't modify 'div ids' into my CSS file such as positioning or others, no changes. This is my link attached to html "<link rel="stylesheet" type="text/css" href="css/style.css">" and it is attached but no effect when I open and start typing on CSS file.
3 Answers
Mario Blokland
19,750 PointsDid you double check if you wrote the div in the css exact the same? How did you implement the link? Where did you save the css file?
Please insert your code here and tell us the path to the css file.
Tony Nguyen
24,934 Pointsmake sure it's writtin like this for your id's or classes
In HTML it should be:
<div id="myID">
</div>
<div class="myClass">
</div>
In css it should look like:
#myID {
}
.myClass {
}
Hope this helps!
Guta Geani
373 PointsTried all, no results, tomorrow I will show you
Tony Nguyen
24,934 PointsOh and make sure your selectors are right too! Depending on your content in your divs.
Guta Geani
373 PointsGuta Geani
373 PointsI will insert tomorrow I'm on mobile right now, my directories are fine and the link works but when I try to add some changes for some divs, doesn't work.
Mario Blokland
19,750 PointsMario Blokland
19,750 PointsOk. I think it is just a tiny problem somewhere. Maybe with the cascade or something. We'll check tomorrow :-)
Guta Geani
373 PointsGuta Geani
373 PointsSure, thank you so much guys for the support, you are awesome and hope it is a tiny problem I am a newbie and love a lot to learn coding.
Mario Blokland
19,750 PointsMario Blokland
19,750 PointsYou will definitely learn. And thanks :-)
Guta Geani
373 PointsGuta Geani
373 PointsHTML
CSS
index.html location (site/index.html) style.css location (site/css/style.css)
This one it's just a test, and doesn't shows me nothing on browser
Mario Blokland
19,750 PointsMario Blokland
19,750 PointsIf this is the only css style on your in your css file, it should work just fine. Did you set the doctype to html too?
<!doctype html>
I am sitting in the university right now. I will check it by the time when I get home :-)
Guta Geani
373 PointsGuta Geani
373 PointsYes I did that, after I changed directories and start again now works, but I still don't understand several things that seems hard for me.
I don't understand commands like "margin, padding, position and others" when I try to move different contents wherever I want. I'm such a newbie, really need help!
Mario Blokland
19,750 PointsMario Blokland
19,750 PointsSo you got it working? If you don't know what margin, padding etc. is, you should definitely watch the css series. Otherwise you will have huge problems in the future. Better build a good foundation instead of standing on wobbling feet :-)
Mario Blokland
19,750 PointsMario Blokland
19,750 PointsP.S. normally you should add a "min-height" to the div to see changes. Otherwise the div would have a height of 0, so you would't see any changes.
Mario Blokland
19,750 PointsMario Blokland
19,750 PointsOr of course, you can put some content in it ;)
Guta Geani
373 PointsGuta Geani
373 PointsI will go to css section and see what I can absorb