We're assuming that you already know how to make WMS GetMap requests to GeoServer and you have already played with simple SLD styles. Now, you'll start creating your first simple style using the CSS syntax. For this recipe, you'll use the countries feature type you published in Chapter 1, Working with Vectors.
Open the CSS Style section from the GeoServer web interface. Then, select the link Choose a different layer. From the list of layers, select PostGISLocal:GeneralizedCountries.
Select the Create a new style link. In the form, select the NaturalEarth workspace and insert the style name, as shown in the following screenshot:
GeoServer inserts a short template for you:
* { fill: lightgrey; }
Replace the code in the textbox with the following rules:
* { fill: #8FBC8F; fill-opacity: 0.7; } * { stroke: #000000; stroke-opacity: 0.7; }
Press the Submit...