Note that there are some explanatory texts on larger screens.

plurals
  1. POSyncfusion TreeView Control CSS Problem
    primarykey
    data
    text
    <p>I am working with the Syncfusion TreeView control to create a folder browser on a web page, our design uses CSS to control the layout of tables, but I cannot figure out how I can stop the table CSS affecting the layout of the TreeView. </p> <p>Currently my Treeview is looking like this:</p> <p><a href="http://imagebin.org/63035" rel="nofollow noreferrer">http://imagebin.org/63035</a></p> <p>See how the checkboxes and the text labels are not aligned to the left hand side of the tree like the folder icons are.</p> <p>My TreeView is defined like this:</p> <pre><code> &lt;div class="TreeViewTable"&gt; &lt;cc1:TreeView ID="tvFileSystem" runat="server" Width="100%" Height="500px" CssClass="TreeView" ImageBaseURL="/images/treeIcons/" DropChildCssClass="DropChildCss" EditNode="False" OnNodeExpanded="tvFileSystem_NodeExpanded" OnNodeCheckChanged="tvFileSystem_NodeCheckChanged" AutoPostBackOnNodeCheckChanged="true" AutoCheckChildNodes="true"&gt; &lt;/cc1:TreeView&gt; &lt;asp:ListBox ID="listFiles" runat="server" Visible="false" Height="150px"&gt;&lt;/asp:ListBox&gt; &lt;/div&gt; </code></pre> <p>The HTML generated by the control looks something like this:</p> <pre><code>&lt;div id="ctl00_mainPageContent_tvFileSystem_R2" class="tvItemRow" style="width:100%;"&gt; &lt;table cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td align="right" class="tvLineImgTD"&gt; &lt;img src="/WebResource.axd" alt="" /&gt; &lt;/td&gt; &lt;td align="right" class="tvLineImgTD tvLineImgTD_1"&gt; &lt;img src="/WebResource.axd" alt="" /&gt; &lt;/td&gt; &lt;td&gt; &lt;div id="ctl00_mainPageContent_tvFileSystem_I2" class="tvItem"&gt; &lt;table cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td id="ctl00_mainPageContent_tvFileSystem_I2_TI" class="tvImgCell"&gt; &lt;div id="ctl00_mainPageContent_tvFileSystem_I2_CI" class="tvImgCont"&gt;&lt;img src="/images/treeIcons/folder.gif" id="ctl00_mainPageContent_tvFileSystem_I2_I" class="tvImg" alt="" /&gt; &lt;/div&gt; &lt;/td&gt; &lt;td id="ctl00_mainPageContent_tvFileSystem_I2_TB" class="tvCheckCell"&gt; &lt;input name="ctl00$mainPageContent$tvFileSystem_I2_B" type="checkbox" id="ctl00_mainPageContent_tvFileSystem_I2_B" class="tvCheck" onclick="_sfctl00_mainPageContent_tvFileSystem.OnClick(this, event)" onmousedown="_sfctl00_mainPageContent_tvFileSystem.OnMouseDown(this, event)" /&gt; &lt;/td&gt; &lt;td id="ctl00_mainPageContent_tvFileSystem_I2_TT" class="tvTextCell"&gt; &lt;table cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td id="ctl00_mainPageContent_tvFileSystem_I2_CT" class="tvTextCont" style="white-space:nowrap;"&gt; 1 &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; </code></pre> <p>My CSS code is looking like this:</p> <pre><code> .TreeView { background-color:White; padding-top:4px; padding-left:1px; border: #7C7C94 1px solid; cursor:default; text-align: left; } .tvItemRow { font-size:9pt; border: none; padding:0; width:auto; text-align:left; } /* TreeView Table Properties */ div.TreeViewTable { border: none; border-bottom: none; padding:0; text-align:left; } div.TreeViewTable table { width:inherit; } div.TreeViewTable table tr th { border: none; padding: 0px; letter-spacing: 1px; } div.TreeViewTable table tr td { border: none; padding: 0px; letter-spacing: 1px; } div.TreeViewTable table tr.alt td { background-color:#EFEFEF; } </code></pre> <p>Any suggestions as to what CSS code to apply to this page to get the elements lined up would be good!</p> <p>Thanks...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload