CSS Inheritance

  • Thread starter Thread starter George Durzi
  • Start date Start date
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"; }
 
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
 
thanks man! I love these solutions. All I needed was the space between
..datagrid, and .itemstyle
 
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"; }
 
Back
Top