How to avoid wrapping in html element?

0 favourites
  • 5 posts
From the Asset Store
Get ready to dive into a sea of endless excitement with "Dolphin Jump," the thrilling new game that puts you in control
  • If you take any HTML element example you can see how it wraps the text when it goes out of the screen.

    But I need to make zoom in on this HTML without the wrapping, how can I avoid it?

    HTML Table sample

    Table wrapped and resized to the screen

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Not sure if this is what you mean, but if you just don't want the text to wrap to the next-line, you can use white-space: nowrap in your css. You can also throw in text-overflow: ellipsis if you want an the dots if a text is cut off and doesn't wrap.

  • Not sure if this is what you mean, but if you just don't want the text to wrap to the next-line, you can use white-space: nowrap in your css. You can also throw in text-overflow: ellipsis if you want an the dots if a text is cut off and doesn't wrap.

    Thanks, it works on simple text, but this is the thing, I implemented Charts js on Construct,

    And I want to zoom in when you are on mobile, this is what I can't do because is wrapped to the screen size, so when I change the layoutscale, the html element remains the same scale.

  • Oh, I've only just recently started testing with the HTML element. Are you saying that when you scale the layout, the html element doesn't scale with it and therefore wraps because the content such as text is now larger? If so, I remember when I was messing around with it that you need to have the element on auto-size, and all units on em so it scales accordingly to the parent. I haven't used chartjs, but assuming I understood your problem correctly, you might need to override some of the styles to use em instead of px.

  • Oh, I've only just recently started testing with the HTML element. Are you saying that when you scale the layout, the html element doesn't scale with it and therefore wraps because the content such as text is now larger? If so, I remember when I was messing around with it that you need to have the element on auto-size, and all units on em so it scales accordingly to the parent. I haven't used chartjs, but assuming I understood your problem correctly, you might need to override some of the styles to use em instead of px.

    Oh, don't worry, I saw the charts js has a plugin to zoom in and I trying to understand how to implement it on Construct using this tutorial:

    Subscribe to Construct videos now

    Thanks again for the help, if I get it I will answer here to show the answer.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)