setting styles for forms

Hi,

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

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

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

This does work for me! I am using styles like

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

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:

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

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

Paul

This works here:

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

:oops: 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

patrick:
This does work for me! I am using styles like

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

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

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…

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

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