0
Could someone tell me if it's possible to CSS position a video tag?
I'm trying to center a video in the center of the screen but no matter what CSS properties I use it doesn't move.
4 ответов
0
I figured it out. I hadn't referenced the styleshet. Thankyou for the help, I am sorry for the hassle.
+ 2
To the extent of my knowledge, position property works with any element.
Although, if you're having problem with specific code, you should link it here so we can have better understanding of what problem you're facing.
+ 2
Reason I can see is because you're not specifying width and height of container div.
0
My html code is:
<div class="container">
<video controls autoplay class="videoHl2">
<source src="HL2.webm" type="video/webm">
</video>
</div>
My CSS is:
.container {
position: relative;
}
.videoHl2{
position: absolute;
left: 0;
top: 50%;
width: 100%;
}