Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Shrink a field? Topic is solved

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
Paul
Posts: 133
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 29 times
Been thanked: 3 times

Shrink a field?

Post by Paul »

Is there a way to "shrink" this entire item down to a smaller footprint?
time-shrink.PNG
You do not have the required permissions to view the files attached to this post.
Paul
Posts: 133
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 29 times
Been thanked: 3 times

Re: Shrink a field?

Post by Paul »

ChatGPT comes through again...!
Added this CSS in the object properties:

Code: Select all

transform: scale(0.65);   transform-origin: center;
but the label doesn't get re-sized?
kev1n
nuBuilder Team
Posts: 4581
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 536 times
Contact:

Re: Shrink a field?

Post by kev1n »

You will need to apply the css separately to the label by JS
Paul
Posts: 133
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 29 times
Been thanked: 3 times

Re: Shrink a field?

Post by Paul »

ChatGPT gave me this:

Code: Select all

label[for="audio_1_time"] {
  font-size: 6px !important;
}
but I get an error:

Uncaught SyntaxError: Unexpected token 'for'
You do not have the required permissions to view the files attached to this post.
Paul
Posts: 133
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 29 times
Been thanked: 3 times

Re: Shrink a field?

Post by Paul »

Got this code to work, but the placement of the label is not so good. I need 'Audio 1 Time' much closer to the date/time box (beside, not above).

Code: Select all

const style = document.createElement('style');
style.textContent = `label[for="audio_1_time"] {
  font-size: 9px !important;
}`;
document.head.appendChild(style);
audio-1-time.PNG
Ideas?
You do not have the required permissions to view the files attached to this post.
Paul
Posts: 133
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 29 times
Been thanked: 3 times

Re: Shrink a field?

Post by Paul »

Got it! CSS:

Code: Select all

transform: scale(0.65);   transform-origin: left;
audio-1-time2.PNG
You do not have the required permissions to view the files attached to this post.
Post Reply