Search
 
SCRIPT & CODE EXAMPLE
 

CSS

center a video horizontally

/*option 1:this makes the video responsive*/
.videoDiv
{
    width: 70%; /*or whatever % you prefer*/
    margin: 0 auto;
    display: block;
}

/* option 2* does not make the video responsive*/

.videoDiv{
  margin:0 auto;
  display: block;
}  
Comment

center a video horizontally

<div class="videoDiv">
  <video width="100%" controls>
    <source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
    <source src="https://www.w3schools.com/html/mov_bbb.ogg" type="video/ogg">
  Your browser does not support the video tag.
  </video>
</div>
Comment

PREVIOUS NEXT
Code Example
Css :: mobile responsive css 
Css :: css text transform 
Css :: table fixed header 
Css :: sass calc with variable 
Css :: text border css 
Css :: css image filter black and white 
Css :: css text color border 
Css :: center elements vertically in div 
Css :: console.log with color font 
Css :: box shadow top and bottom only 
Css :: round button css 
Css :: mixin for transition css 
Css :: css top right corner 
Css :: width 100% with padding 
Css :: remove border between td 
Css :: center grid 
Css :: box shadow to make border bottom 
Css :: hide scrolbar tailwind 
Css :: background image fill div 
Css :: css last child 
Css :: how to make background more darker with css 
Css :: remove underline from <a HTML 
Css :: reduce image size css 
Css :: To make the content of the select2 RTL or LTR 
Css :: default cursor css 
Css :: clamp margin 
Css :: Install Node Sass/Scss 
Css :: how to make image same size as text css 
Css :: css list style url siz 
Css :: line under text css 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =