How can I change the default fore color of my custom module?

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
4/24/2008 2:26:34 AM
Gravatar
Total Posts 3

How can I change the default fore color of my custom module?

How can I change the default fore color of my custom module?

I don't like the color of "#336699", and i am a newbie to CSS file and to the System of mojoPortal's Skin, I use the Skin which named "treeviewmenu1".

thanks

Roy

2008-4-24

4/24/2008 8:12:03 AM
Gravatar
Total Posts 18439

Re: How can I change the default fore color of my custom module?

Hi,

First I would say the general idea of skinning is to make things look consistent across features not different. However in the case that you want to make a feature style custom, you can easily do it by introdcing new css classes in your feature then use those classes to assign style.

So for eaxmple features should have a panel wrapped around them, this is the opening tag of the panel in the Links module:

<asp:Panel ID="pnlWrapper" runat="server" CssClass="panelwrapper linksmodule">

Notice how you can assign multiple css classes separated by a single white space. So panelwrapper may have the deafult styles for all features but if I want to make the links module have different colors I can override the css settings from .panelwrapper { } in the class .linksmodule { } in the css.

So for example if I want to make the links in the links module have yellow text, I would edit the stylecolors.css file and add an entry like this:

.linksmodule a { color: yellow; }

probably using just this would color text, but to get the links I need the above because color for links is already set elsewhere so we need to select the a elements inside the container with the class linksmodule.

.linksmodule { color: yellow; }

There are many different CSS selector syntax for selecting things to style with css. Learning how to select things is really the key thing to learn in css.

Hope it helps,

Joe

4/24/2008 7:53:36 PM
Gravatar
Total Posts 3

Re: How can I change the default fore color of my custom module?

Thank you very much

So, I can change the RowStyle,AlternatingRowStyle of GridView by my own css file in my custom features, but I can't change its HeaderStyle. such as forecolor, The forecolor of Header is allways as the same as the Feature title's forecolor(#336699). The white forecolor of Header is I need.

thanks

roy

2008-4-25

4/26/2008 7:22:31 AM
Gravatar
Total Posts 18439

Re: How can I change the default fore color of my custom module?

It can be done. I would look at the rendered html markup and figure out how to create a css selector.

In this case the correct selector for the header text might be something like this:

.AspNet-GridView table thead tr th,
.AspNet-GridView table thead tr th a:link,
.AspNet-GridView table thead tr th a:visited,
.AspNet-GridView table thead tr th a:active { color: green; }

So actually this example is 4 selectors separated by commas and one set of style assigned to all of them. You may only need the first selector but if the text is links (ie sorting enabled) then you may need all 4.

This example may not work but it gives you the right idea.

Hope it helps,

Joe
 

4/27/2008 7:53:44 PM
Gravatar
Total Posts 3

Re: How can I change the default fore color of my custom module?

Thank you very much

I will try

You must sign in to post in the forums. This thread is closed to new posts.