How do I get rid of the 2 pixels of space under a VIDEO element?

2 views
Skip to first unread message

The alMIGHTY N

unread,
Dec 14, 2010, 5:20:06 PM12/14/10
to HTML5 Video Development
Hello all,

I'm trying to create a custom video player, and I can't seem to
eliminate 2 pixels of vertical space that always appears under any
VIDEO element I place onto the page. According to Chrome and Firefox's
DOM inspectors, there is nothing between the VIDEO element and the DIV
element that follows it and neither element has margins or padding.

I was hoping someone here may have encountered this issue and know a
way to handle it.

Thank you.

-Nathaniel



sample code...



<video width="320" height="180" preload="true">
<source src="videos/x.mp4"/>
</video>
<div>Hello</div>

Christopher Zacharias

unread,
Dec 14, 2010, 6:18:36 PM12/14/10
to html5-video...@googlegroups.com
I ran into this a while back at YouTube. I cannot remember exactly what I did to solve it, but try playing with the display style. For instance, first try display:block... and if that doesn't work, try display:inline-block... I feel like that fixed it, but it has been months since I worked on the YouTube HTML5 player. 
--
Christopher Zacharias

Heff (VideoJS)

unread,
Dec 15, 2010, 12:05:38 PM12/15/10
to HTML5 Video Development
Try line-height: 0; on whatever's containing it.
Reply all
Reply to author
Forward
0 new messages