Forum Academy Marketplace Showcase Pricing Features

Fixed Height and Width in Div

Hey Bubble fellows, i’m stuck in something. i’am create an plugin and i need that div have an fixed height and width, i try to put the code below on Intialize

function(instance, context) {

var div;

div = $('<div id="calendar"></div>')
div.css({width: '1312px', height: '650px'});
instance.canvas.append(div) = div    


But didn’t work. I trying to put an CSS on “header” and use the selector to select the id but still didn’t work! Give-me some advice, i’m feel that i don’t see small detail. Thanks to everyone!!

I suck with most CSS and this is not MY CSS, but I will give you some advice: quit using jquery


Yes, jQuery is not the best way right now, but i use library that works with jquery, so unfortunately in this plugin i need to use jQuery :confused:

I tried but unfortunately i don’t have any result! I’ll still try other stuffs

You’re using jq because bubble. Turn off “this plugin uses jquery” and write proper modern code. Library my ass.

1 Like

I just tested your original code and it works. I have a single element on the page (from a plugin) and I copied and pasted your code into the plugin and added it to an empty page. You can see from inspector it created the element on the page with the width specified without any issue.

I suspect something else is causing the problem (not the code above).

1 Like

You’re right! The div really become the width and height that i put, but the callendar not display in all div! :confused: