setting a size for HTML object

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
Chameleon
 
 
Posts: 67
Joined: Sat Sep 29, 2018 7:29 pm

setting a size for HTML object

Post by Chameleon » Sat Apr 11, 2020 9:15 pm

Hi not sure where to start here so I will just jump right in lol.
I am looking to use a script (from php jabbers) when I insert the given html code into my webpage the script shows ok but it is the full width of the page. I need it to be "contained" i.e. space either side. I have tried putting the html into a layer etc but nothing seems to stop it from showing full width. Is this possible to achieve? if so how? the php script im trying to use is the limo booking software if thats any help.

cheers.

User avatar
BaconFries
 
 
Posts: 4791
Joined: Thu Aug 16, 2007 7:32 pm

Re: setting a size for HTML object

Post by BaconFries » Sat Apr 11, 2020 9:49 pm

the php script im trying to use is the limo booking software if thats any help.
Not really as we have no way to test / download without having to pay first! With that said the script that you are using will be using its own size(s) height / width via css. So when using in the HTML Object you should set the HTML to 'do not use div' then you can specify the height yourself.

User avatar
ColinM
 
 
Posts: 548
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia
Contact:

Re: setting a size for HTML object

Post by ColinM » Sat Apr 11, 2020 10:45 pm

Not Sure if this is possible - but could you set the width and height attributes to 100% instead of a pixel value, then you could adjust the HTML box for each view. I do that for Google Maps, but it doesn't work with the FB Plug In.
Yours truly
Colin M
Western Australia
My Website

Chameleon
 
 
Posts: 67
Joined: Sat Sep 29, 2018 7:29 pm

Re: setting a size for HTML object

Post by Chameleon » Sat Apr 11, 2020 10:56 pm

Hi folks, thanks for the replies. You can get a 7 day test link for the software that you can use for free to evaluate it before purchase, thats what I am doing :D I will give those ideas a go and see what happens,

cheers

User avatar
crispy68
 
 
Posts: 943
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: setting a size for HTML object

Post by crispy68 » Sat Apr 11, 2020 11:39 pm

Place their script into an html code box and set the html to 'do not use div'.

Insert a layout grid and set the columns to 1x 10x 1x and place the html box into the column 10x (middle column). The layout grid will give you the column on either side while the script will be in the center.

I use their scripts. You can see an example of the above here: https://tinyurl.com/u25aobc

It's a different script but the same principal.

Chameleon
 
 
Posts: 67
Joined: Sat Sep 29, 2018 7:29 pm

Re: setting a size for HTML object

Post by Chameleon » Sun Apr 12, 2020 12:45 pm

Hi Crispy, I have tried that but it still shows full width when previewed.
this is the reply I got from php jabbers in relation to my query,

"The script front end is with responsive design so it takes the whole element with. In order to limit it simply add it in a div element with the size you want"

I think that is the same thing you have suggested but it dosn't seem to work??

User avatar
crispy68
 
 
Posts: 943
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: setting a size for HTML object

Post by crispy68 » Sun Apr 12, 2020 3:02 pm

I just tried it and it works for me. See screenshot of my browser below:

Image

What Phpjabbers told you is correct which is what the layout grid does.

Chameleon
 
 
Posts: 67
Joined: Sat Sep 29, 2018 7:29 pm

Re: setting a size for HTML object

Post by Chameleon » Sun Apr 12, 2020 3:28 pm

Hi Crispy, thats exactly what im trying to achieve but for some reason it's not working for me?? does it show in preview or do I have to upload and view live everytime? I have done both but no success.

User avatar
crispy68
 
 
Posts: 943
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: setting a size for HTML object

Post by crispy68 » Sun Apr 12, 2020 3:39 pm

If you have it installed on your server, you should be able to use direct links to it and it will show in preview.

as you can see below, all I did was insert a layout grid, create 3 columns (1 10 1) and place the html box in the middle column.

Image

Only other thing I can think of is there is something else not right on your page. Would have to see a demo project to comment more.

Chameleon
 
 
Posts: 67
Joined: Sat Sep 29, 2018 7:29 pm

Re: setting a size for HTML object

Post by Chameleon » Sun Apr 12, 2020 3:55 pm

I have done exactly the same but not getting the width reduced. I have uploaded it to my website theorbe.co.uk but it still showes full width?
I have nothing on the page apart from the layout grid and the html set in the center same as you??? confusing

User avatar
crispy68
 
 
Posts: 943
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: setting a size for HTML object

Post by crispy68 » Sun Apr 12, 2020 4:55 pm

The reason is you are placing the <script> tag before the end <body> tag. The script is actually what controls everything. By it being just before the end body tag, it is not in the layout grid so it is full width. Place it back inside the code box inside the layout grid and it will work.

If you didnt physically move it then go to Tools --> Options --> HTML and uncheck 'Move JavaScripts to the end of the page'

Chameleon
 
 
Posts: 67
Joined: Sat Sep 29, 2018 7:29 pm

Re: setting a size for HTML object

Post by Chameleon » Sun Apr 12, 2020 7:06 pm

Crispy that worked a treat. Doing exactly what I need it to do. Your last bit of advice was the problem, I unchecked the box in HTML to "'Move JavaScripts to the end of the page' and it worked thanks a lot for you help.

Post Reply