.Net 2 Web Panel Font Colour

W

Waldy

Hi there,
how do you set the colour of a Panels text via CSS. Neither
Color, ForeColor nor Font-Color work in a CSS file. It is set to grey /
blue colour. Is this fixed by the system?
 
W

Waldy

I should mention that I am trying to set the GroupingText of the Panel.
There are three colour properties for this control. BackColor, BorderColor
and ForeColor. ForeColor does affect labels that are dropped onto the
Panel, but not the GroupingText. BorderColor does not seem to have any
effect on anything.
 
P

Phil H

I should mention that I am trying to set the GroupingText of the Panel.
There are three colour properties for this control.  BackColor, BorderColor
and ForeColor.  ForeColor does affect labels that are dropped onto the
Panel, but not the GroupingText.  BorderColor does not seem to have any
effect on anything.

GroupingText should assume the ForeColor (is does in my case).

BorderColor should affect the outline around the panel (make sure
BorderStyle and BorderWidth are also set)

If you've been experimenting with CSS styles it maybe that they are
interfering in some way and you need to remove any references.
 
W

Waldy

Phil H said:
GroupingText should assume the ForeColor (is does in my case).

Yes it should but it doesn't. Neither the ForeColor property or the CSS
color attribute have any effect on it.
BorderColor should affect the outline around the panel (make sure
BorderStyle and BorderWidth are also set)

That's correct. It only effects the border around the panel, not the
grouping border which appears to be fixed colour and style.
 
W

Waldy

I found some info on this. Here's how to set your text and border to red.

If you set your Panel class name to clsPanel.

Then add the following to the CSS file:

..clsPanel legend
{
color: red;
}

..clsPanel fieldset
{
border: solid 1px red;
}

The legend tag applies the style to the GoupingText and the fieldset tag
applies the style to the GroupingBorder.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,201
Latest member
KourtneyBe

Latest Threads

Top