CSS Inheritance

G

George Durzi

I'm trying to maintain several color schemes throughout my site, so that
different modules have a different color scheme based on a css style.

Let's take the example of trying to set styles for datagrid controls.

..datagrid { font-size: 8pt; border-color:#E7E7FF; border-style:none;
border-width:thin; background-color:White;}.datagrid.itemstyle {
color:"#4A3C8C"; background-color:"#E7E7FF"; }
 
J

Jerry III

It shouldn't be. Try refreshing the page (and clearing your browsers cache)
as IE sometimes doesn't reload linked documents. And personally I would put
space between .datagrid .itemstyle, you want the style to mean .itemstyle
which is a child of .datagrid.

Jerry
 
G

George Durzi

thanks man! I love these solutions. All I needed was the space between
..datagrid, and .itemstyle
 
D

Don Verhagen

In George Durzi <gdurzi@nospam_hotmail.com> typed:
: thanks man! I love these solutions. All I needed was the space between
: .datagrid, and .itemstyle

syntax is a wonderful thing eh?

Don




: :: It shouldn't be. Try refreshing the page (and clearing your browsers
:: cache) as IE sometimes doesn't reload linked documents. And
:: personally I would put space between .datagrid .itemstyle, you want
:: the style to mean .itemstyle which is a child of .datagrid.
::
:: Jerry
::
:: ::: Sorry, I hit Send accidentally, here's the rest of the message
::::
:::
::: I want to define another style called datagrid2 as follows
:::
::: .datagrid2 { .....}
::: .datagrid2.itemstyle { ...}
:::
::: but when i create a datagrid like this:
::: <asp:datagrid cssclass="datagrid2">
::: <itemstyle cssclass="itemstyle"/>
::: </asp:datagrid>
:::
::: The itemstyle style is being sucked in from the .datagrid style,
::: not the .datagrid2 style?
:::
::: should i define this differently?
:::
::: :::: I'm trying to maintain several color schemes throughout my site,
:::: so that different modules have a different color scheme based on a
:::: css style.
::::
:::: Let's take the example of trying to set styles for datagrid
:::: controls.
::::
:::: .datagrid { font-size: 8pt; border-color:#E7E7FF;
:::: border-style:none; border-width:thin;
:::: background-color:White;}.datagrid.itemstyle { color:"#4A3C8C";
:::: background-color:"#E7E7FF"; }
 

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

Top