Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML Can someone please write this simple code?

burrowspaul

New Coder
Currently when I upload the code below into an HTML component on my site the content is constrained to a small box, however there is far more space in the html component to fit the content.

Can someone please let me know what and where to write the code that would be most appreciated!




HTML:
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>

<model-viewer alt="Neil Armstrong's Spacesuit from the Smithsonian Digitization Programs Office and National Air and Space Museum" src="shared-assets/models/NeilArmstrong.glb" ar ar-modes="webxr scene-viewer quick-look" environment-image="shared-assets/environments/moon_1k.hdr" poster="shared-assets/models/NeilArmstrong.webp" seamless-poster shadow-intensity="1" camera-controls></model-viewer>
 
Last edited by a moderator:
Currently when I upload the code below into an HTML component on my site the content is constrained to a small box, however there is far more space in the html component to fit the content.

Can someone please let me know what and where to write the code that would be most appreciated!




HTML:
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>

<model-viewer alt="Neil Armstrong's Spacesuit from the Smithsonian Digitization Programs Office and National Air and Space Museum" src="shared-assets/models/NeilArmstrong.glb" ar ar-modes="webxr scene-viewer quick-look" environment-image="shared-assets/environments/moon_1k.hdr" poster="shared-assets/models/NeilArmstrong.webp" seamless-poster shadow-intensity="1" camera-controls></model-viewer>
Hi @burrowspaul,
What are you trying to do? Make the box bigger?
 
  • the html component allows for style inputs I just don't know the code I have tried to put the following pretty much everywhere in the code to try and effect it


  • <style> {Width 600px; height 800px;}</style>


Try something like this:
CSS:
model-viewer {
  width: 600px;
  height: 800px;
}


More on CSS here:
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom