How to change the color and height of a title in a subform?

Questions related to customising nuBuilder Forte with Javascript or PHP.

How to change the color and height of a title in a subform?

Postby kknm » Fri May 22, 2020 11:43 pm

How to change the color and height of a title in a subform?
kknm
 
Posts: 101
Joined: Sat Apr 11, 2020 7:33 am

Re: How to change the color and height of a title in a subfo

Postby kev1n » Fri May 22, 2020 11:52 pm

The height should be high enough to display Multiline.
You just have to use '<br>' to force a line break.


Inspect elements with the Developer Console (F12):

Get Started With Viewing And Changing The DOM
https://developers.google.com/web/tools ... vtools/dom

Then use JavaScript/JQuery to modify the style.


See: https://streamable.com/181xk6
kev1n
 
Posts: 728
Joined: Mon Oct 15, 2018 2:13 am

Re: How to change the color and height of a title in a subfo

Postby kknm » Sat May 23, 2020 9:50 pm

kev1n wrote:Get Started With Viewing And Changing The DOM
https://developers.google.com/web/tools ... vtools/dom

I clarify the question:
I ask about changing the global style for the whole site, not just subforms.
kknm
 
Posts: 101
Joined: Sat Apr 11, 2020 7:33 am

Re: How to change the color and height of a title in a subfo

Postby kknm » Sun May 24, 2020 5:29 am

I changed nubuilder4.css, but it seems to me it would be advisable to include a style editor in the nubuilder package to change the style of the site.
Something like skins...
kknm
 
Posts: 101
Joined: Sat Apr 11, 2020 7:33 am

Re: How to change the color and height of a title in a subfo

Postby kev1n » Sun May 24, 2020 10:17 am

nubuilder4.css should not be modified. The the recommendation is to add your own styles in the (Setup -> ) Header.
Header
The Header is placed in the HTML5 header of nuBuilder Forte and can be used for adding...

Javascript libraries
Javascript functions
Style Sheets
CSS Styles

https://webcache.googleusercontent.com/ ... /index.php

(The nuBuilder Wiki shows errors that's why I'm linking a webcache URL)
kev1n
 
Posts: 728
Joined: Mon Oct 15, 2018 2:13 am

Re: How to change the color and height of a title in a subfo

Postby kknm » Thu May 28, 2020 3:53 pm

kev1n wrote:nubuilder4.css should not be modified. The the recommendation is to add your own styles in the (Setup -> ) Header.
Header
The Header is placed in the HTML5 header of nuBuilder Forte and can be used for adding...

Javascript libraries
Javascript functions
Style Sheets
CSS Styles

https://webcache.googleusercontent.com/ ... /index.php

(The nuBuilder Wiki shows errors that's why I'm linking a webcache URL)

Adding modified styles to the setup-header has no effect !
Code: Select all
   </script>
       <script src='libs/browse_total_rows.js' type='text/javascript'></script>
       
   function nuHeaderTest() {
       console.log('Functions placed here before a closing script tag are available anywhere in nuBuilder Forte');
   }
   
   </script>
   <style>   
//   .nuActionButton {background-color:#0073aa;}
.nuBrowseTitle { background-color: #FFFFB3;}

   </style>
   <script>
kknm
 
Posts: 101
Joined: Sat Apr 11, 2020 7:33 am

Re: How to change the color and height of a title in a subfo

Postby kev1n » Thu May 28, 2020 4:06 pm

You have to log in again for the changes to take effect.
kev1n
 
Posts: 728
Joined: Mon Oct 15, 2018 2:13 am

Re: How to change the color and height of a title in a subfo

Postby kknm » Thu May 28, 2020 4:12 pm

kev1n wrote:You have to log in again for the changes to take effect.

No, no ... Even rebooting and clearing the cache does not help.
kknm
 
Posts: 101
Joined: Sat Apr 11, 2020 7:33 am

Re: How to change the color and height of a title in a subfo

Postby kev1n » Thu May 28, 2020 4:19 pm

A reboot or clearing the cache is not necessary. Try this code:

Code: Select all
</script>
<style>   

.nuBrowseTitle {background-color:#FFFFB3;}

</style>
<script>
Last edited by kev1n on Thu May 28, 2020 5:39 pm, edited 1 time in total.
kev1n
 
Posts: 728
Joined: Mon Oct 15, 2018 2:13 am

Re: How to change the color and height of a title in a subfo

Postby kknm » Thu May 28, 2020 5:36 pm

Yes, changing the order of the tags corrected the situation. Thank!
kknm
 
Posts: 101
Joined: Sat Apr 11, 2020 7:33 am


Return to Custom Code