how make it same width to div..?

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
manuel_songokuh
 
 
Posts: 147
Joined: Tue May 30, 2017 8:47 pm

how make it same width to div..?

Post by manuel_songokuh »

hi

i need : object HTML box, i have size of box (html) but i want:

width="same size of box html"
height="same size of box html"

how make it?
manuel_songokuh
 
 
Posts: 147
Joined: Tue May 30, 2017 8:47 pm

Re: how make it same width to div..?

Post by manuel_songokuh »

example:

Html1 size 160,90

code html inside object html1:

width= html1
height= html1
User avatar
crispy68
 
 
Posts: 2737
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: how make it same width to div..?

Post by crispy68 »

If the HTML box is set to "use <div> to set position and size of the HTML" then what's inside should not get any bigger than this.
manuel_songokuh
 
 
Posts: 147
Joined: Tue May 30, 2017 8:47 pm

Re: how make it same width to div..?

Post by manuel_songokuh »

not work, i inside code and result image is big..
maybe i need remove width and hieght?
manuel_songokuh
 
 
Posts: 147
Joined: Tue May 30, 2017 8:47 pm

Re: how make it same width to div..?

Post by manuel_songokuh »

<video id="example_video_1" class="video-js" controls preload="none" width="640" height="264" poster="http://vjs.zencdn.net/v/oceans.png" data-setup="{}">
<source src="http://vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
<source src="http://vjs.zencdn.net/v/oceans.webm" type="video/webm">
<source src="http://vjs.zencdn.net/v/oceans.ogv" type="video/ogg">
<track kind="captions" src="../shared/example-captions.vtt" srclang="en" label="English">
<track kind="subtitles" src="../shared/example-captions.vtt" srclang="en" label="English">
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
</video>
User avatar
crispy68
 
 
Posts: 2737
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: how make it same width to div..?

Post by crispy68 »

It's because your code has a specific width and height set.

Change the height in your code to: width="100%" and height="auto"
manuel_songokuh
 
 
Posts: 147
Joined: Tue May 30, 2017 8:47 pm

Re: how make it same width to div..?

Post by manuel_songokuh »

width="100%" and height="auto"

result different size of html1 to browser.. did you tested it in WWB?
User avatar
crispy68
 
 
Posts: 2737
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: how make it same width to div..?

Post by crispy68 »

You have to keep in mind that the video has a set aspect ratio. So you need to set the width to 100% to fit your html div. The height will fluctuate based on the width to keep this aspect ratio. You need to know what this ratio is if you are using it as a fixed width and height. Based on your example the height is about 41% of the width. For example, if you set the HTML box width to 300px then your height will need to be 120px.

What you haven't mentioned is how are you using this? Is the width and height of the HTML box going to be the same in all breakpoints? Are you using it in a grid?
manuel_songokuh
 
 
Posts: 147
Joined: Tue May 30, 2017 8:47 pm

Re: how make it same width to div..?

Post by manuel_songokuh »

i want to try videojs in wwb..video player html5 is too base...standard..
videojs is full custumizer configurable.. so i want to try import videojs.. but css.. so i use html1 for easy to position (div), size for resize..comfortable..

so i wish to try videojs..

because wwb has not extension for videojs..

you are good hand code for create extension for videojs in wwb? im not expert..
if extension paid i will buy faster... lol...
User avatar
BaconFries
 
 
Posts: 5328
Joined: Thu Aug 16, 2007 7:32 pm

Re: how make it same width to div..?

Post by BaconFries »

Moved to Off Topic Section as question related to a "Third" party script.
manuel_songokuh
 
 
Posts: 147
Joined: Tue May 30, 2017 8:47 pm

Re: how make it same width to div..?

Post by manuel_songokuh »

ok for move off topic.

but i need configure with wwb, someone, who can succeeded works with videojs..?
manuel_songokuh
 
 
Posts: 147
Joined: Tue May 30, 2017 8:47 pm

Re: how make it same width to div..?

Post by manuel_songokuh »

nothing... help me..?
User avatar
Pablo
 
Posts: 21577
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: how make it same width to div..?

Post by Pablo »

Sorry, there is no support on third part scripts, because for us it will also takes a lot of time to figure out how to use this code.
Post Reply