# Pictures not floating to right

**URL:** <https://forum.code.org/t/pictures-not-floating-to-right/37377>\
**Category:** Coding and Debugging Help\
**Created:** [December 14, 2022, 4:25pm UTC](https://forum.code.org/t/pictures-not-floating-to-right/37377 "2022-12-14T16:25:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sherry.wood](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@sherry.wood](https://forum.code.org/u/sherry.wood)\
**Post date:** [December 14, 2022, 4:25pm UTC](https://forum.code.org/t/pictures-not-floating-to-right/37377/1 "2022-12-14T16:25:06Z")

</div>

[Posts in the debugging category need to have the following pieces of information included in order to help other teachers or our moderator team best help you. Feel free to delete everything in brackets before posting your request for debugging help.]

**Link to the project or level:** [https://codeprojects.org/projects/weblab/NjiRPuplrRn5KXKVB8FOPpZDHkHPEaSBsUXMC7TsgBk](https://codeprojects.org/projects/weblab/NjiRPuplrRn5KXKVB8FOPpZDHkHPEaSBsUXMC7TsgBk)  
**What I expect to happen:** all pics to got to right with margin of 10  
**What actually happens:** some float a little, some not at all  
**What I’ve tried:** adding an img class for images, adding div, no luck  
please help-thanks

[https://codeprojects.org/projects/weblab/NjiRPuplrRn5KXKVB8FOPpZDHkHPEaSBsUXMC7TsgBk](https://codeprojects.org/projects/weblab/NjiRPuplrRn5KXKVB8FOPpZDHkHPEaSBsUXMC7TsgBk)

---

<div class="post-metadata">

**Author:** ![mwood](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mwood/32/4941_2.png) [@mwood](https://forum.code.org/u/mwood)\
**Post date:** [December 14, 2022, 7:46pm UTC](https://forum.code.org/t/pictures-not-floating-to-right/37377/2 "2022-12-14T19:46:33Z")

</div>

@sherry.wood,

I remixed you project and tried a combination of what you said you had tried already, so see if this is kind of what you are after.

I created a div with a class of right. Inside that div, I placed the image and the caption (using the tags `<figcaption> .... </figcaption>`

Then, I styled that div to float to the right (rather than the images themselves).

The tag you (your student) used p2 isn’t really a legitimate html5 tag, so that could have been part of the problem. I removed that and used either regular paragraph tags or the figcaption tags.

I did the first two images this way. See if this is what they are after.

Good luck!

Mike

[https://codeprojects.org/projects/weblab/e9DZh4Zdb5AU9qZF5Ubv7Ez6CJPvnM0UwT3PBLyxJ0Y](https://codeprojects.org/projects/weblab/e9DZh4Zdb5AU9qZF5Ubv7Ez6CJPvnM0UwT3PBLyxJ0Y)
