View Single Post
Old 05-22-2004, 01:38 PM   #1 (permalink)
Stompy
Banned from being Banned
 
Location: Donkey
[asp.net/CSS] Override generated tables' style attributes?

If you slap a DataGrid on an asp.net page and leave the settings as default, it generates the table code with along with the following attributes:

cellspacing=0 border=1 rules="all" style="border-collapse:collapse;"

...and that sucks because hard coded HTML overrides any CSS you may have for that particular element. Any style I apply to it regarding border and border-spacing is just flat out ignored.

My questions are:

1. Is there a way to prevent asp.net from tossing whatever garbage it wants into the table tags? I just want a pure clean tag with the corresponding id/class: <table id="myDataGrid" class="MainReport">

If not...

2. Is there a way to make sure that CSS overrides all?
__________________
I love lamp.
Stompy is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73