NetTalk Central

Author Topic: css in divs  (Read 3898 times)

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
css in divs
« on: May 15, 2020, 03:54:35 AM »
Hi Bruce,

When I start my (NT) webserver and press F12 I can see the HTML code and the css-classes that are used in the various divs.
For every NetWebForm and NetWebBrowse there is a CSS-tab in the template where one can input a css-class-name that one wants to apply to that specific part of the HTML source that is generated for the web-application.

In order to find out which part of the page is affected by which (custom) css-class-name, I have filled out all the fields with a unique, easy identiable name (see attachment1.png) with a leading space, so that the css-class-names, asigned by NTWS remain present in the HTML code. (All my css-class-names start with 'qdl', as QDL.NL is my company name).

Then I compiled the app went to localhost:88 in my browser and pressed F12.
To my surprise not all the divs in the page that have nt- or ui- class-names embedded, have one of my qdl- class-names present.
Most of them have though.
Problem for me is that I also want to tweak some of the css settings of these divs.
In order to do that, I create the same css-class in my custom.css and tweak the class the same way I have tweaked the original class in the browser.
I don't know if I have to use the '!important' option or not, but to be on the safe side I use it.
When I refresh the page, I see that the changes I have made have effect. I also notice that the line in the original css, is crossed out. Is that because I have canged the line in my custom.css .
Problem (for me) however is that all references to that specific css-class "look" at the one in custom.css .

What to do if I don't want that.
Main question is, is it possible to add a new class-name to all divs that normally use ny- or ui- classes?

Cheers,

René
« Last Edit: May 15, 2020, 05:08:12 AM by Rene Simons »
Rene Simons
NT14.14

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: css in divs
« Reply #1 on: May 15, 2020, 07:57:07 AM »
Hi Rene,

I had a similar situation where I wanted to change the background color for the titlebar on one particular netwebform - and only that one form! I could also not find a template prompt that would let me do that so I asked Bruce on the NTUG webinar where he showed a nice 'trick' to handle that situation. The recording is not yet up on the CS site but you can watch it on Youtube here: https://www.youtube.com/watch?v=FEyrEHsNPtw
It starts around 54:00

HTH
Peter

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: css in divs
« Reply #2 on: May 16, 2020, 02:40:21 AM »
Thankyou Peter,

That is a very useful 'trick'

Rene
Rene Simons
NT14.14