Hi Gang,
So this is my second year teaching CS Discoveries. I’m on Unit 2: Lesson 11. I’m writing CSS on my style sheet but the changes aren’t appearing after saving. The program seems to be ignoring the code altogether.
For some reason it is only NOT working in regards to my images. I want them to be centered…that’s all. When I look at the style sheet “img” is in pink/red, and all the other elements appear in blue and are working.
Any way you could share your page and send us a URL to look at? If not, a larger screenshot of both the html and the css could also help. Sometimes, a missing semi-colon, curly bracket or other “syntax” typo is the culprit.
That is caused by the float:right; rule in your css img rules.
Float will “lift” the image off the page and cause other elements to behave differently as a result.
One option would be to delete the float rule, however, if you do want the image on the right side of the page, it will be a little more complicated to handle because the Creative Commons logo is also an image, so you will have to style them separately by using classes.
This does start to go a little beyond the scope of the html taught in unit 2. I could recommend using W3Schools (website) as a reference guide. I would probably create a new section called <footer> where I would put my creative commons logo and then I could style images only in the body with the float:right; and then, you may have to use what is called “clearfix” css rules to help the text flow around the images. (https://www.w3schools.com/howto/howto_css_clearfix.asp)
This may be more work than you want to go to, but that’s the rough outline of how to get there.