Can't set all border colors in datagrid..using CSS

A

Amil Hanish

Don't answer this if you don't know what you are talking about.

I have lots of datagrids on many pages. I want to use a css stylesheet so
color changes can be easily made via a single file. I can't figure out how
to use the css to modify ALL the border colors of the datagrid. I DON'T
WANT TO USE THE datagrid properties of the designer since it bypasses the
css file.

If I test things using the designer, it works fine. If I set the
BorderColor property in the designer, it does two things:
- sets the border-color style property
- adds the bordercolor tag for the table (style sheets can't do this)

When using a css style, I can set the datagrid's cssclass property
fine...but without the bordercolor table tag...only the outter most border
changes color :-( I could add the bordercolor tag in my codebehind or in
actual asp:datagrid tag, but I'd have to hardcode the color and not use the
css file. Bummer.

Any ideas?

Amil
 
D

darrel

Any ideas?

If you can give the table, itself, a class, then you can style the borders
in the CSS:

table.classname {border-style: whatever}
table.classname td {border-style: whatever}
table.classname td.classname {border-style: whatever}

etc.

is that what you were looking for?

-Darrel
 
A

Amil Hanish

You da man! Perfect!

Thanks a bunch.

Amil

darrel said:
If you can give the table, itself, a class, then you can style the borders
in the CSS:

table.classname {border-style: whatever}
table.classname td {border-style: whatever}
table.classname td.classname {border-style: whatever}

etc.

is that what you were looking for?

-Darrel
 

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

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top