Excursionproject align video

Hey,

I almost finished the excursion project, you can see it here live:
marcusbbb.github.io/excursion
but a can’t align the video correctly in the center.
check out my code here:

Why isn’t this working and how can i change it?

greetings,
Marcus

Hi Marcus,

you can’t align inline or inline-block elements with margin: auto;.
You have two possibilities: Either you add the attribute text-align: center; to the parent element <section> , but that will also effect the text, or you wrap your video in a <div>, which you set to margin: auto (but then you’d need to set a width, too) or you add text-align:center to that wrapping <div>.

1 Like

Hi Mirja,

Thanks, that’s really helpfull!

Marcus.

1 Like