stylesheet for DataGrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

How do I det the font on my DataGrid from the stylesheet? I have tried:

..Grid
{
text-decoration: none;
font-family :Arial;
}

Thanks
Julia
 
Hi

The strange thing is that it is the font that is not working. I have now
tried:
..Grid
{
font-family:Elephant;
background-color:Lime;
}
and the color of my datagrid is Lime but the font is NOT Elephant.... what
can be the problem?

Thanks
J
 
Hi again,

I had to add the td to the stylesheet:
..GridItem td
{
font-family :Elephant;
}

/Julia
 
Julia,

With your stylesheet all you have to do now is to set the grid's CssClass
property to "Grid".

Eliyahu
 
CSS is a cascading schema, so if you assign the font-family of
"Elephant" to the grid (HTML table on client-side), then everything
underneath it should follow, unless you specified somewhere else in
your stylesheet that <tr> or <td> tags should have something else...

Another word of advice: don't assign a font-family just one value -
assign it 2 or 3. For example, not everyone will have your font
"Elephant" installed on their computer. Therefore, assign it something
like this:

..Grid { font-family: Elephant, Arial, Helvetica; }

In this example, there is a font that should cover your system, a
Windows PC, and a Mac... this just increases the usefulness of your
CSS.

Happy coding!
 
Back
Top