Can't get different border colors with css

Hi All,

I’m using the following code to color my label borders in different colors but it doesn’t seem to work:

label.classname
{
	border-width: 1px 2px 3px 4px;
	border-top-color: red;
	border-right-color: green;
	border-bottom-color: blue;
	border-left-color: yellow;
        background-color: #A4B29B;
	background-image: url(media:///col_1_background.png);
}

Anyone’s got an idea of what I could be doing wrong? :roll:

Cheers,
Maria

Hi Maria,

You can try !important to overwrite the default styles.

Example:

border-color:#ffffff !important;

Hi Maria,

When you set any properties on elements via the properties pane then your CSS stylesheet for those properties will be overruled by those settings. So if you want to use a stylesheet you should not touch those properties in the properties pane but control it all by CSS.

ROCLASI:
Hi Maria,

When you set any properties on elements via the properties pane then your CSS stylesheet for those properties will be overruled by those settings. So if you want to use a stylesheet you should not touch those properties in the properties pane but control it all by CSS.

Thanks Robert,
I’m aware of that and I doublechecked if the elements have default properties, they do.

Cheers,
Maria

Hi Maria,

Lets first start with what doesn’t work. Do none of the CSS properties get applied? In neither the Smart or Web Client?

Are you sure that the right stylesheet is applied to the form, the correct styleclass to the label and that in the stylesheet the declaration “label.classname” is not redefined later on in the stylesheet?

Are you actually using the name “classname” or is that just a dummy value for the example here?

Paul

What if you use the following syntax:

label.classname
{
   border-width: 1px 2px 3px 4px;
   border-style: solid;
   border-color: #FF0000 #00FF00 #0000FF #FFFF00;
   background-color: #A4B29B;
   background-image: url(media:///col_1_background.png);
}