Cascading style sheets enable you to define a consistent look and
feel throughout your Web site by maintaining the contents (Web pages) and
the design (the style sheet) separately.
To create a new cascading style sheet:
- Create a static or a dynamic Web project if you have not already
done so.
- In the Project Explorer, expand your project and right click on
your WebContent folder or on a subfolder under WebContent. Note
that if you choose any other folder in which to create the CSS file, then
it will not be included in the WAR file that is deployed to the server.
- From the context menu, select . The New Cascading Style Sheet window appears
with your folder selected
- Type a file name into the File name field, making sure you include
a css extension in the file name.
- You have several options for proceeding:
- To accept the defaults associated with a new CSS file, select Finish.
- To use a template file for the initial content of your CSS file,
select Next. The Select CSS Template window appears.
Select the Use CSS Template check box, and then select
one of the sample templates. You can also select the CSS Templates link
to add or remove HTML templates to your list of templates.