# How to make a CSS for a field...

**URL:** <https://forum.servoy.com/t/how-to-make-a-css-for-a-field/5306>\
**Category:** Classic Servoy\
**Created:** [January 5, 2006, 10:25am UTC](https://forum.servoy.com/t/how-to-make-a-css-for-a-field/5306 "2006-01-05T10:25:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)\
**Post date:** [January 5, 2006, 10:25am UTC](https://forum.servoy.com/t/how-to-make-a-css-for-a-field/5306/1 "2006-01-05T10:25:55Z")

</div>

with matte-border…only a border on left, right, bottom…width 1 px…with a color.

I have tried several things:

```auto
field.blah
{
	background-color: #ffffff; 
	border-style: solid;
	font: 11pt "Verdana"; 
	text-align: left; 
	border-width: 0px 1px 1px 1px;
	border-color: #999999,#999999,#999999,#999999;
}

```

Doesn’t create any border at all

```auto
field.blah
{
	background-color: #ffffff; 
	border-style: solid;
	font: 11pt "Verdana"; 
	text-align: left; 
	border-width: 2px 2px 2px 2px;
	border-color: #999999,#999999,#999999,#999999;
}

```

Create a border with 2px

```auto
field.blah
{
	background-color: #ffffff; 
	border-style: solid;
	font: 11pt "Verdana"; 
	text-align: left; 
	border-width: 1px 1px 1px 1px;
	border-color: #999999,#999999,#999999,#999999;
}

```

Doesn’t create any border at all

All the other border-style also dont satisfy me…  
Am I missing something…or…

Servoy Developer  
Version R2 2.2.3-build 335  
Java version 1.5.0\_05-b05 (Windows 2000)

---

<div class="post-metadata">

**Author:** ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)\
**Post date:** [January 5, 2006, 11:25pm UTC](https://forum.servoy.com/t/how-to-make-a-css-for-a-field/5306/2 "2006-01-05T23:25:00Z")

</div>

```auto
field.blah
{
	background-color: #ffffff; 
	border-style: solid;
	font: 11pt "Verdana"; 
	text-align: left; 
	border-width: 0px 1px 1px 1px;
	border-color: #999999,#999999,#999999,#999999;
}

```

I think the commas between the colours is causing the problem. Also, since it looks like you want the same colour all the way round you can simplify to

```auto
field.blah
{
	border-color: #999999;
}

```

Also, make sure the border property is set to DEFAULT.

Hope this helps,

Christian

---

<div class="post-metadata">

**Author:** ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)\
**Post date:** [January 6, 2006, 3:12pm UTC](https://forum.servoy.com/t/how-to-make-a-css-for-a-field/5306/3 "2006-01-06T15:12:47Z")

</div>

everything is set to DEFAULT…  
and tried

```auto
field.blah 
{ 
   border-color: #999999; 
}

```

but no result

---

<div class="post-metadata">

**Author:** ![Harry\_Catharell](https://avatars.discourse-cdn.com/v4/letter/h/e19adc/32.png) [@Harry\_Catharell](https://forum.servoy.com/u/Harry_Catharell)\
**Post date:** [January 6, 2006, 4:42pm UTC](https://forum.servoy.com/t/how-to-make-a-css-for-a-field/5306/4 "2006-01-06T16:42:42Z")

</div>

Hi tweetie,

**Servoy Developer**  
**Version R2 2.2.3-build 335**  
**Java version 1.5.0\_05-48 (Mac OS X)**

I put the following into a style and it worked for me on the above platform:

```auto
field.blah 
{ 
   background-color: #ffffff; 
   border-style: solid; 
   font: 11pt "Verdana"; 
   text-align: left; 
   border-width: 0px 1px 1px 1px; 
   border-color: #999999; 
}

```

I have attached a screen shot which includes the style editor window and the form in the background with the field and properties showing.

Hope that this will help 🙂

Cheers  
Harry

 ![Picture 1.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/1X/8abaebdbf69be5f38fa28129d7de83c9f5e00d09.png)

---

<div class="post-metadata">

**Author:** ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)\
**Post date:** [January 7, 2006, 3:13pm UTC](https://forum.servoy.com/t/how-to-make-a-css-for-a-field/5306/5 "2006-01-07T15:13:09Z")

</div>

Hi Tweetie,

one thought: you may have an error somewhere earlier in your style sheet which is causing it to fail…

---

<div class="post-metadata">

**Author:** ![tweetie](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tweetie](https://forum.servoy.com/u/tweetie)\
**Post date:** [January 11, 2006, 7:59am UTC](https://forum.servoy.com/t/how-to-make-a-css-for-a-field/5306/6 "2006-01-11T07:59:20Z")

</div>

I removed all other css styles…and now it works…so I gues you are right…  
The error was somewhere in the css there was this style:  
font: 11pt “Verdana”;  
the quotes caused the problem.

Thankx everyone

> swingman:  
> Hi Tweetie,
> 
> one thought: you may have an error somewhere earlier in your style sheet which is causing it to fail…
