0

OK so I know this has been asked a million times but I'm using the usual tricks and it isn't working.

Code here:

JS Fiddle

I need the image of the driver centred inside the circular div.

My code:

    <div style= 'margin: 0;margin-left: auto;margin-right: auto;display: block;'>

<img src='http://fantasy-f1-league.com/images/drivers/Carlos_Sainz_Jr.png' width = '90'></div>

A lot of the code isn't mine (I'm using Dragula based on a demo I found) I suppose some of the other CSS might be over riding what I am trying to do.

Thanks.

davidjwest
  • 538
  • 3
  • 22

1 Answers1

1

You can do it with flex:

Add this to your div that is holding image:

display: flex;
justify-content: center;

Updated fiddle: https://jsfiddle.net/o03eqLux/

Zvezdas1989
  • 1,445
  • 2
  • 16
  • 34