# Centering Images

**URL:** <https://forum.code.org/t/centering-images/11425>\
**Category:** Unit and Lesson Discussion\
**Tags:** csd-unit-2, csd-unit-2-lesson-7\
**Created:** [October 25, 2017, 6:48pm UTC](https://forum.code.org/t/centering-images/11425 "2017-10-25T18:48:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anicholson2869](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/anicholson2869/32/2179_2.png) [@anicholson2869](https://forum.code.org/u/anicholson2869)\
**Post date:** [October 25, 2017, 6:48pm UTC](https://forum.code.org/t/centering-images/11425/1 "2017-10-25T18:48:39Z")

</div>

How do you center an image on a website? (Either with or without text wrapping).

---

<div class="post-metadata">

**Author:** ![mmathews](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mmathews/32/4419_2.png) [@mmathews](https://forum.code.org/u/mmathews)\
**Post date:** [October 25, 2017, 7:08pm UTC](https://forum.code.org/t/centering-images/11425/2 "2017-10-25T19:08:34Z")

</div>

Here are a couple ways to do it.  
[https://codeprojects.org/AtIndl1PNeXMSFkHCbDtaTgA21CZZUoNshXUtzzOxPA](https://codeprojects.org/AtIndl1PNeXMSFkHCbDtaTgA21CZZUoNshXUtzzOxPA)

---

<div class="post-metadata">

**Author:** ![anicholson2869](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/anicholson2869/32/2179_2.png) [@anicholson2869](https://forum.code.org/u/anicholson2869)\
**Post date:** [October 26, 2017, 2:57pm UTC](https://forum.code.org/t/centering-images/11425/3 "2017-10-26T14:57:05Z")

</div>

Thanks! This was helpful.

---

<div class="post-metadata">

**Author:** ![jbaker1](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jbaker1](https://forum.code.org/u/jbaker1)\
**Post date:** [October 27, 2018, 3:46pm UTC](https://forum.code.org/t/centering-images/11425/4 "2018-10-27T15:46:33Z")

</div>

Where can I find the code to center?

---

<div class="post-metadata">

**Author:** ![bradleywellsashley](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/bradleywellsashley/32/522_2.png) [@bradleywellsashley](https://forum.code.org/u/bradleywellsashley)\
**Post date:** [October 28, 2018, 2:13pm UTC](https://forum.code.org/t/centering-images/11425/5 "2018-10-28T14:13:32Z")

</div>

Mrs. Baker,

A little trick on _almost_ any website - you can right click (sometimes you need to right click in different places if you are clicking on a webkit tool) and select “Show Page Source” or “View Page Source” or “Inspect Element” - these will open a separate window which you can then look at ANY code you find online. More advanced webpages have a lot of css and js which is hard to uncover - but every page with have the doctype, html, head, title, body tags and probably a p and h1 or two. This is a great exercise for students to see the building blocks of what they are doing and how those things are included on existing webpages.

Hope that helps!  
Brad

---

<div class="post-metadata">

**Author:** ![jbaker1](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jbaker1](https://forum.code.org/u/jbaker1)\
**Post date:** [October 28, 2018, 10:15pm UTC](https://forum.code.org/t/centering-images/11425/6 "2018-10-28T22:15:03Z")

</div>

That is EXTREMELY helpful…THANK YOU SO MUCH!!!
