Jachin Sheehy wrote:
> CssClass is the attribute to use. ASP.NET will convert this to a class
> attribute when it renders the HTML.
>
> Jachin Sheehy
> http://strangepants.com
>
> On 12/2/06, Pk <[EMAIL PROTECTED]> wrote:
>   
>> I wish to use the same style for all my datagrids. I think I need to use a 
>> class, but my code does not want to accept the word class in the asp.net 
>> datagrid tag. How can I implement this in a CSS.
>>     
> ______________________________________________________________________
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> IE7 information -- http://css-discuss.incutio.com/?page=IE7
> List wiki/FAQ -- http://css-discuss.incutio.com/
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>
>   
ASP.NET tags can be a bit of a trip, especially when panels, repeaters, 
and checkbox lists are involved. You have to anticipate the html that 
the controls will render, because they add an extra layer of abstraction 
and can disrupt the document flow as a result. You really have to make 
use of your contextual and decendent selector skills.

You may want to style a checkbox list, for example, by applying a class 
via CssClass - but it renders as a <table> instead, throwing your style 
declarations for a loop. The final elements you're trying to target wind 
up inside of table cells, which you then must target individually. I 
recently worked on a project that made heavy use of rounded corner boxes 
and ASP.NET webcontrols, and it took eternity to get everything just 
right - and even then it had to depart from the designer's comp. I felt 
awful about that, but I learned a lot about this subject as a result.

- JCD
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to