I'm a newbie at ASP.NET and am having trouble styling a DataList. I've lately become enamored with rounded corners on borders and am trying to use the effect on all of my pages by applying it to all HTML tags. On Internet Explorer, the border on my DataList looks terrible because I see rounded corners around each element of my DataList rather than just the four corners of the outer box border.
I tracked this down to the fact that ASP.NET is adding:
style="collapse-border:collapse"
to the tag that begins my DataList in the rendered HTML. If this style rule is not present, the border looks exactly as I intended.
I don't know how to eliminate the border-collapse style from what ASP.NET generates. I don't see it present in the Visual Web Developer IDE or in the properties for the DataList. I can't seem to override it in a style sheet either. Does the style attribute on a tag trump all other rules? Can anyone suggest how I can get ASP.NET to not generate the border-collapse style?
A DataList
renders the border-collapse: collapse;
style when its CellSpacing
property is set to 0 (the default). To remove the style, set CellSpacing
to -1
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With