Jump to content

How to get the canvas takes all the space available..


Nockawa
 Share

Recommended Posts

Ok guys, I know this is not strictly about BabylonJS, but I hope that some of you already faced this issue and have an answer.

My HTML skills are very close to...nothing, but I spent a good amount of time searching, trying before asking for help.

All I want to do is using Bootstrap to create an header and footer, and I want my canvas to take the WHOLE space available between these header & footer.

Is there really no way to get out of this without some JavaScript code? What is the best way to go ?

I've made a fiddle for you to understand clearly what I'd like to achieve.

https://jsfiddle.net/nockawa/z0L72nn1/33/

Thanks for your help.

 

Link to comment
Share on other sites

raaaaaaaaah, at last !!! I've made it! I analyses the CSS of the Babylonjs playground, replicate everything until I could find the answer and also the culprit !

https://jsfiddle.net/nockawa/z0L72nn1/34/

In my case I was doing EVERYTHING right, except one little tiny thing: the bootstrap container must be defined with "position: absolute" then I use the top/bottom/height to specify the placement of it, and it works !

HTML/CSS are a mess...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...