# setting styles for forms

**URL:** <https://forum.servoy.com/t/setting-styles-for-forms/3836>\
**Category:** Classic Servoy\
**Created:** [March 10, 2005, 11:55am UTC](https://forum.servoy.com/t/setting-styles-for-forms/3836 "2005-03-10T11:55:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmad](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ahmad](https://forum.servoy.com/u/ahmad)\
**Post date:** [March 10, 2005, 11:55am UTC](https://forum.servoy.com/t/setting-styles-for-forms/3836/1 "2005-03-10T11:55:35Z")

</div>

Hi,

I created a style called _noborder_ for setting in form..

This does not work where as the default one (_form_) works

```auto
form
{
	border-style: none; 
	background-color: #F1F1F1; 
	border-width: 0px;
}

form.noborder
{
	background-color: #ffffff; 
	border-style: solid; 
	border-color: #ffffff;
	border-width: 0px;
}

```

Any idea please?

Thanks

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [March 10, 2005, 12:35pm UTC](https://forum.servoy.com/t/setting-styles-for-forms/3836/2 "2005-03-10T12:35:12Z")

</div>

This does work for me! I am using styles like

```auto
form.noborder
{
	background-color: #ffffff;
	border-style: solid;
	border-width: 0px 0px 0px 0px;
}

```

So maybe you have to use border-width like I do? Did you check that the border property of the form is set to default?

Patrick

---

<div class="post-metadata">

**Author:** ![pbakker](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pbakker](https://forum.servoy.com/u/pbakker)\
**Post date:** [March 10, 2005, 12:36pm UTC](https://forum.servoy.com/t/setting-styles-for-forms/3836/3 "2005-03-10T12:36:43Z")

</div>

Mmm, I was just looking at the same thing, how to get an empty border on a form using style sheets, but I cannot get it to work properly.

Even if I use your example, I still do not get the same border result as when I would set the border property of the form to Emptyborder(0,0,0,0).

Are you saying that you actually get a real empty border when setting this in your stylesheet:

```auto
form 
{ 
   border-style: none; 
   border-width: 0px; 
}

```

?

I also tried (combinations of)

- border-style: empty;
- border-width: 0px 0px 0px 0px;  
But to no avail…

Paul

---

<div class="post-metadata">

**Author:** ![pbakker](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pbakker](https://forum.servoy.com/u/pbakker)\
**Post date:** [March 10, 2005, 12:42pm UTC](https://forum.servoy.com/t/setting-styles-for-forms/3836/4 "2005-03-10T12:42:44Z")

</div>

I now also tried Patricks suggestion, but a border remains on the right side of the window…

Paul

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [March 10, 2005, 12:42pm UTC](https://forum.servoy.com/t/setting-styles-for-forms/3836/5 "2005-03-10T12:42:59Z")

</div>

This works here:

```auto
form
{
	border-style: solid;
	border-width: 0px 0px 0px 0px;
	background-color: #EEEEEE;
}

```

---

<div class="post-metadata">

**Author:** ![pbakker](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pbakker](https://forum.servoy.com/u/pbakker)\
**Post date:** [March 10, 2005, 12:46pm UTC](https://forum.servoy.com/t/setting-styles-for-forms/3836/6 "2005-03-10T12:46:09Z")

</div>

![:oops:]( "Embarassed") edited the wrong class…

Yep, solid and all border 0px creates an empty border. Would think though that border-style = none; would result in the same…

Paul

---

<div class="post-metadata">

**Author:** ![ahmad](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ahmad](https://forum.servoy.com/u/ahmad)\
**Post date:** [March 10, 2005, 12:50pm UTC](https://forum.servoy.com/t/setting-styles-for-forms/3836/7 "2005-03-10T12:50:01Z")

</div>

> patrick:  
> This does work for me! I am using styles like
> 
> ```auto
> form.noborder
> 
> ```

{  
background-color: #ffffff;  
border-style: solid;  
border-width: 0px 0px 0px 0px;  
}

> ```auto
> 
> So maybe you have to use border-width like I do? Did you check that the border property of the form is set to default?
> 
> Patrick
> 
> ```

After I set border-width: 0px 0px 0px 0px; it wroked for me in the browse mode.. the strange thing is when I’m in the design mode it shows the default form color. I restarted servoy & also repository but still the form showing the default color in the design mode..

Anyway thanks for your workaround help.. it saves me a lot of time

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [March 10, 2005, 1:47pm UTC](https://forum.servoy.com/t/setting-styles-for-forms/3836/8 "2005-03-10T13:47:18Z")

</div>

> the strange thing is when I’m in the design mode it shows the default form color

that is normal behaviour. You only see style class styles in browse mode…

---

<div class="post-metadata">

**Author:** ![ahmad](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ahmad](https://forum.servoy.com/u/ahmad)\
**Post date:** [March 10, 2005, 2:24pm UTC](https://forum.servoy.com/t/setting-styles-for-forms/3836/9 "2005-03-10T14:24:08Z")

</div>

> patrick:  
> that is normal behaviour. You only see style class styles in browse mode…

that’s not true.. I have used styles for almost all the elements in my forms which reflects immediately in the design mode when I change any of the styles

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [March 10, 2005, 2:29pm UTC](https://forum.servoy.com/t/setting-styles-for-forms/3836/10 "2005-03-10T14:29:40Z")

</div>

yes, but not forms. That’s what I meant.
