This is a migrated thread and some comments may be shown as answers.

[Solved] New Q1 skins showing extra lines within tables

1 Answer 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Scott Eoff
Top achievements
Rank 2
Scott Eoff asked on 21 Apr 2009, 04:26 PM
Hey I'm not a graphics artist or as knowledgable about CSS, but since the new skins have been applied I have extra lines within my table(s) that I would like to remove. The follow link shows an image with the extra lines indicated within a table by red boxes.

http://www.eofftech.com/portals/0/ExtraSpacingExample.jpg

I use to also have horzontal lines showing up too, but figured out that I could remove those with:

 

div.NoPadding .rgMasterTable td

 

{

 

border: 0 !important;

 

}


I'm assuming I can do something similar with the extra lines, but don't know the syntax to remove them.

Can anyone help?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 23 Apr 2009, 08:27 AM
Hello Scott,

When you place a <table> inside a RadGrid ItemTemplate, its cells inherit the RadGrid table cell padding and border styles. In order to prevent this, you can do the following:

1. Assign a custom CSS class to the outermost table inside the ItemTemplate:

<ItemTemplate>
    <asp:Panel ID="panel1" runat="server">
        <table cellpadding="0" cellspacing="0" class="MyTemplateTable">

            ..........

        </table>
    </asp:Panel>
</ItemTemplate>


2. Use the CSS class in a CSS rule, which overrides the RadGrid skin for the table inside the ItemTemplate and determines specific padding and border styles:

.RadGrid  .MyTemplateTable  td
{
        padding: 2px;
        border: 0;
}

The above CSS rule will influence only table cells inside the ItemTemplate, not RadGrid table cells. The following CSS rule influences both the RadGrid cells, and the template table cells, so it is not the best option:

div.NoPadding  .rgMasterTable  td
{
    border: 0  !important;
    padding: 0  !important;
}


Please note that if you use a lot of nested tables in the ItemTemplate, it may be less convenient to set appropriate padding and border styles, because the paddings and borders will combine and increase for every nested table.

Greetings,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Scott Eoff
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Share this question
or