css style for selector <tr> with asp.net gridview -
i have table generated asp.net gridview, , have put space between each <tr>.
in css file have description <tr> selector:
.tr { margin-bottom: 5px; } but, using developer tools in browser, i've founded style <tr> used not css file, has "user defined stylesheet" , can't change margin-bottom in browser developer tools.
so, problem?
you've created class selector named "tr" prefixing tag period, you're not targeting element itself, elements class="tr". try dropping .:
tr { margin-bottom: 5px; } beware, though, might not want affect every single <tr> in site. maybe specify special class on gridview (<asp:gridview cssclass="fatrows" />) , target rows more specific css:
table.fatrows tr { margin-bottom: 5px; } or stick gridview conventions specifying special css class on row items:
<asp:gridview> <rowstyle cssclass="fatrows" /> </asp:gridview> and target rows themselves:
tr.fatrows { margin-bottom: 5px; } obviously you'll want come more meaningful class name...
Comments
Post a Comment