Search
 
SCRIPT & CODE EXAMPLE
 

HTML

center iframe

<div class="iframe-container">
  <!--iframe link is the link to the jsfiddle-->
  <iframe src="https://jsfiddle.net/8z9s1t6x/2/"></iframe>
</div>

<style>
  .iframe-container {
		text-align:center;
  		width:100%;
  }
</style>
Comment

center iframe in editor

/* center iframe in editor */
/* div wrapping ifrrame */
div {
    display: flex;
    align-items: center;
    justify-content: center;
}
Comment

iframe center

<div style="text-align:center;"><iframe style="
display:auto;
width="560" height="315" src="https://www.youtube.com/embed/" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
Comment

Center an iframe

div, iframe {
    width: 100px;
    height: 50px;
    margin: 0 auto;
    background-color: #777;
}

iframe {
    display: block;
    border-style:none;
}
Comment

PREVIOUS NEXT
Code Example
Html :: prevent webpage zooming in mobile 
Html :: stop video javascript 
Html :: input datetime 
Html :: html display only on desktop 
Html :: bootstrap flex align 
Html :: html how to make text not bold 
Html :: how to move all html files from one directory to other using python 
Html :: font awesome 
Html :: how to create a page break html 
Html :: html horizontal line style 
Html :: html estrutura 
Html :: free ebooks 
Html :: change input required text html 
Html :: how to display online image in html 
Html :: textarea readonly 
Html :: accept zip codes in html 
Html :: in select option how to make one default 
Html :: html align text right 
Html :: how to put autoplay music in the background of the page html 
Html :: html inline comment 
Html :: basecamp 3 api tag mention 
Html :: react bootstrap navbar fixed 
Html :: bootstrap display none 
Html :: buttons in video tag html 
Html :: mailto link html 
Html :: bootstrap colors 
Html :: html change name in tab 
Html :: filter in v-html 
Html :: greta thunberg 
Html :: am pm time html javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =