There are a lot of questions in the forums that can be answered by changing the CSS for a specific item. However editing the supplied CSS files are dangerous, since changes you make will be lost with the next NetTalk update.
This post describes the steps needed for you to use your own CSS file. Inside this file you can put your own styles (based on the shipping ones if you like.)
Step 1:
--------
Create a new CSS file in your \web\styles folder. This is a text file, you can use something like notepad to create it. Name it whatever you like - custom.css is popular. (But be careful Notepad doesn't call it custom.css.txt)
Step 2:
---------
Add this CSS file to the list in the Web Server procedure, Styles tab.
Step 3:
---------
Into this new CSS file you can place your own styles. Usually the easiest way to start is by copying an existing style from the all.css file and then renaming it, and modifying it to your needs.
NOTE: CSS IS CASE SENSITIVE
Step 4:
---------
In your net web app, set the "thing" (it might be a browse, or a form field, or whatever) to use the new style. There are CSS tabs just about everywhere that give you a lot of control over the CSS class that is being used.
EXAMPLE:
-----------
To change the style of a browse
a) Do Step 1 and Step 2 as laid out above.
b) For a browse, go to the NetWebBrowse Settings, to the CSS Classes tab. Notice that the browse is (by default) set to use the 'BrowseTable' class
c) open \web\styles\all.css in Notepad. Find the BrowseTable style and copy it to your custom.css file. Notice that it has 3 parts to it...
.BrowseTable {
font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333;
margin: 5px 0px 5px;
border-collapse: collapse;
border: 1px solid #888;
padding: 0px;
}
.BrowseTable th {
font-weight: bold;
padding: 2px;
border: 1px solid #AAA;
}
.BrowseTable td {
padding: 2px;
border: 0px solid #AAA;
height: 20px;
}
They need a unique name so rename these 3 bits, to say MyBrowseTable in the custom.css file.
d) make any changes to the browse "look" that you want. For example to give each "cell" in the browse a border, set the border in the "td" section to 1
.myBrowseTable {
font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333;
margin: 5px 0px 5px;
border-collapse: collapse;
border: 1px solid #888;
padding: 0px;
}
.myBrowseTable th {
font-weight: bold;
padding: 2px;
border: 1px solid #AAA;
}
.myBrowseTable td {
padding: 2px;
border: 1px solid #AAA;
height: 20px;
}
e) Back in the App, change the browse to use 'myBrowseTable' instead of 'BrowseTable'
REMEMBER CSS IS CASE SENSITIVE so make sure you get the Case right.
f) Lastly - Compile and run your program, and run the browser. You will need to press Ctrl-F5 in your browser after making changes to the CSS file in order to see the changes take effect.
You do not need to re-compile, or re-run the program while you fiddle with CSS changes. Just pressing Ctrl-F5 will reload the new file.
You will need to re-compile and re-run if you change any setting in the APP (for example a setting on the CSS Classes tab.)