Help on centering an image within a div

Responsive Web Design - Tribute page

How would i centre my Einstein Image within the div and make it look much better in terms of size.

I would highly appreciate it if you help me out :slight_smile:
ps: i am new to html ,css and making web pages in general

On your #img-div, position: relative is not doing anything. There you could use display: flex. Read up on flex. Then adding margin of auto left and right on your image will center it.

As for adjusting the image size, you simply change width or height to make it the size you want.

Add this in the container of your image (#img-div) :
#img-div{ display: flex; justify-content: center; align-items: center; flex-direction: column;

1 Like