nicolafranchini/VenoBox

maxWidth does not work correctly due to overwriting width in styles

Closed this issue · 1 comments

Check out examples of implementations with videos on the documentation site.

Pay attention to the example with a simple video (mp4), it uses the following code:

<a class="my-video-links" data-autoplay="true" data-vbtype="video" data-ratio="1x1" data-maxwidth="400px" href="my-video.mp4">MP4</a>

Here the data-maxwidth="400px" attribute is specified, which should limit the width to 400px, but it does not happen
The reason for this is the definition of the following styles in the src/venobox.css file:

.vbox-child.venoratio, .vbox-child.vbox-inline{
    max-width: 100%;
}

Perhaps the solution is to replace max-width to width

Thanks for the note, it was mainly a wrong order of the rules inside the css. Check the latst version.