問題:我無法在Telerik TopPane中將高度設置爲自動。我最終的默認高度值爲230像素。Telerik TopPane高度自動?
代碼:
<div id="ParentDivElement" style="height: 100%;"> <telerik:RadSplitter ID="MainSplitter" runat="server" Height="100%" Width="100%" Orientation="Horizontal" Skin="Outlook" BorderSize="0"> <telerik:RadPane ID="TopPane" runat="server" Height="auto" MinHeight="0" MaxHeight="0" Scrolling="none" BorderStyle="None" EnableAjaxSkinRendering="False" EnableTheming="False"> <!-- Place the content of the pane here --> <div id="tcp_main"> <div id="tcp_logo"> <image src="images/test/logo.png" alt="logo" /> </div> <div id="tcp_text"> <h1> Hello world </h1> </div> </div> </telerik:RadPane> <telerik:RadSplitBar ID="RadsplitbarTop" runat="server" EnableResize="False" /> <telerik:RadPane ID="MainPane" runat="server" Scrolling="none" MinWidth="500"> <telerik:RadSplitter ID="NestedSplitter" runat="server" Skin="Outlook" LiveResize="true"> <telerik:RadPane ID="LeftPane" runat="server" Width="200" MinWidth="150" MaxWidth="400"> <!-- Place the content of the pane here --> </telerik:RadPane> <telerik:RadSplitBar ID="VerticalSplitBar" runat="server" CollapseMode="Forward" /> <telerik:RadPane ID="ContentPane" runat="server"> <!-- Place the content of the pane here --> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPane> </telerik:RadSplitter> </div>
條件:如果我height屬性設置爲auto,我得到以下錯誤:
Property value is not valid.
,如果我點擊細節我得到:
'auto' cannot be parsed as a unit as there are no numeric values in it. Examples of valid unit strings are '1px' and '.5in'.
問題: 它看起來像Telerik控件中的高度不被接受,什麼做我必須做的最終與汽車或它的等效功能?
注意:我不想在CSS中使用!important。
這不起作用。設置高度時,使用javascript更改窗口大小時高度會調整。但高度不是用css auto設置的,所以功能不同。我想在CSS中具有與「auto」相同的功能。 – NomenNescio 2012-01-09 10:53:53
除非您實現自定義JavaScript,否則無法實現SplitterPane自動移動的效果。我建議的確如你設置overflow屬性滾動一樣,你會看到div展開。 – Lloyd 2012-01-09 10:59:18
我不在乎自動移動分隔欄。我想將寬度設置爲「width:auto;」 – NomenNescio 2012-01-09 11:30:50