Center Iframe Horizontally Without Specifying Width/Height CSS -


I have an iframe which I am trying to center using CSS, but Is there a way to do this without specifying the height and width of the iframe element?

iframe is a block level element it takes the entire width of the original container So if you want to put it in the center of your original container, you have to set it in CSS with width , among other things.

Another way is that the original container.


Comments