2
I’m trying to make this HTML5 video player icons responsive.
<div id="video-controls">
<div class="play-video">
{!! Html::image('img/video/play.png', 'Play / Pause Video', ['class' => 'play-pause']) !!}
</div>
<div class="progress">
<span class="progress-bar"></span>
</div>
<div class="mute-video">
{!! Html::image('img/video/mute.png', 'Mudo', ['class' => 'mute']) !!}
</div>
<div class="volume">
<span class="volume-bar"></span>
</div>
<div class="setting-video">
{!! Html::image('img/video/settings.png', 'Opções', ['class' => 'settings']) !!}
</div>
<div class="full">
{!! Html::image('img/video/full-screen.png', 'Tela Cheia', ['class' => 'full-screen']) !!}
</div>
</div>
CSS
.video{ position: relative; width: 100%; max-width: 873px; margin: auto; #video-controls{ position: absolute; background-color: #eff2f6; width: 98%; max-width: 850px; margin: auto; left: 0; right: 0; bottom: 3px; line-height: 18px; height: 18px; opacity: 1; text-align: center; transition: all 0.35s ease; display: table-cell; div{ display: inline-block; max-width: 100%/6; } } }
I’ve used display: table
and display:table-cell
, display:inline-block
. But I couldn’t. The size of the video control bar is 850px
. I need you to stay responsive up to that size.
I tried to use width: 100%
and max-width
, and nothing.
The main
is everyone’s father, but doesn’t have a css
interfering.
Can make a Fiddle?
– KaduAmaral
I can’t make it today...
– Diego Souza
Want the tag
div#video-controls
get responsive right? Where is it? Put the HTML that surrounds it in the question.– KaduAmaral
She’s out there crazy.
– Diego Souza
But she is
100%
. I need the icons to fill all the space on that bar proportionally.– Diego Souza
"Where is she?" I meant her location in the code, what are her parent elements. She is the daughter of the
body
, or of tagvideo
or adiv
? Also put the CSS of these relatives.– KaduAmaral
main
>div.video
>div#video-controls
.– Diego Souza
Have you tried using
display: flex;
?– Lucas Fontes Gaspareto
I didn’t try it because I read that this property is not yet working in all browsers. But I may have some method that makes it work. I’ll try to use.
– Diego Souza
But what elements do I apply this @devgaspa property to ?
– Diego Souza
this property works as if it were a container for your children leaving, for example, all the children of the container flexible Ivs. this article can help you (https://css-tricks.com/snippets/css/a-guide-to-flexbox/).
– Lucas Fontes Gaspareto
Good afternoon Deesouza, always try to post generated code, you can get this with Ctrl+U in webbrowser, if you don’t limit your help that is a problem with CSS only to those who work with the same framework (which I believe is Laravel). Good luck!
– Guilherme Nascimento