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 :: html prevent newline 
Html :: Resize the image in jupyter notebook 
Html :: html small tag 
Html :: checkbox switch bootstrap 
Html :: cache control html 
Html :: how to turn html5 picturee into link 
Html :: html sample code 
Html :: fa fa-thumbs-o-up icon 
Html :: contact form html code 
Html :: tailwind css text wrap 
Html :: summernote 
Html :: Prettier not formatting HTML files in VS Code 
Html :: html input box integer only 
Html :: sweetalert 
Html :: html italic text 
Html :: capture webcam js 
Html :: unable to resolve dependency tree react html email 
Html :: bootstrap error message 
Html :: jquery ajax add loading 
Html :: text without html laravel function 
Html :: how do i get the toggle menu on the right bootstrap 
Html :: how to make a password system in html 
Html :: ion icon image 
Html :: hide navbar bootstrap 5 
Html :: html download file from directory 
Html :: html form templates 
Html :: html email button 
Html :: html table colspan and rowspan 
Html :: remove action in woocommerce 
Html :: eslint ignore v-html 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =