.embed-webcam { height: 0; width: 100%; padding-bottom: 56.25%; overflow: hidden; position: relative; top: 0; left: 0; } .embed-webcam iframe { width: 100%; height: 100%; position: absolute; top: 0; left: 0; overflow:hidden; } .webcam {width: 100%;margin:0 auto;position:relative; overflow:hidden;}