Skip to content
How do I center an image?
Profile icon
kenzielixir

The title says it all. I can't figure out how to center the coin image.

You are viewing a single comment. View All
Profile icon
Coder100

Put it inside a div:

<div style="text-align: center;"><img></div>
Profile icon
kenzielixir

In CSS?

@Coder100

Profile icon
Coder100

no, this is html

@kenzielixir

Profile icon
Coder100

oh lol here, in your case it looks like:

<div> <img id = "tails" src ="img/tails.png" alt="tails" height="220px" width="240px" onclick="flipCoin1()"/> </div>

@kenzielixir

Profile icon
kenzielixir

Ohhh okay. Thanks!

@Coder100

Profile icon
Coder100