2个控件之间的空格 [英] Space between 2 controls
本文介绍了2个控件之间的空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在如下所示的td元素块中,有2个asp.net控件。我希望两者之间有空间,并在tr块的右侧制作第二个控件(asp:HyperLink)。有人可以帮助我的CSS吗?谢谢。
< div < span class =code-attribute> id = header dojotype = dijit.layout.ContentPane region = top >
< tr >
< h1 style = 身高:30px; > < /跨度>定位点或在路线<跨度类=代码关键字> 474上的段; 跨度> <跨度类=代码leadattribute> / H1 跨度> <跨度类=代码 - 关键字>>
< / tr >
< tr >
< td cospan = 3 style = border-removed olive thick solid;高度:15px; >
< asp:Label ID = LabelHeader2 runat = server 文本 = WMATA GIS应用程序 样式 = 宽度:350像素; padding-left:10px; > < / asp:标签 >
< asp:HyperLink ID = HyperLink3 正文 = 帮助
< span class =code-attribute> 工具提示 = 应用程序的帮助
< span class =code-attribute> href = PDFs / Editor.pdf runat = server
< span class =code-attribute> style = 身高:20px;宽度:25px;填充右:5像素; margin-top:0px; >
< / asp:HyperLink >
< / td >
< / tr >
< ; 跨度> <跨度类= 代码leadattribute> /格跨度> <跨度类= 代码关键字>> 跨度>
解决方案
<内部TD BLOCKQUOTE>需要多一个表像该<表>< TR>< TD>首先ASP控制< / TD>< TD>第二个天冬氨酸控制< / TD>< ; / tr>< table> 并将第一个td对齐为左,第二个对齐为右。它将解决您的问题
< blockquote>在Hyper上使用css规则float:right链接;)
< div id = header 的dojoType 跨度> <跨度类= 代码关键字 > =跨度> <跨度类= 代码关键字> dijit.layout.ContentPane 跨度> <跨度类= 代码 - 属性> region = top >
< tr >
< h1 style = height:30px; > 跨度>定位点或在路线<跨度类=代码关键字> 474上的段; 跨度> <跨度类=代码leadattribute> / H1 >
< / tr >
< tr >
< td cospan = 3 style = border-removed olive thick solid;高度:15px; >
< asp:Label ID = LabelHeader2 runat = server 文本 = WMATA GIS应用程序 样式 = 宽度:350像素; padding-left:10px; > < / asp:标签 >
< asp:HyperLink ID = HyperLink3 正文 = 帮助
< span class =code-attribute> 工具提示 = 应用程序的帮助
< span class =code-attribute> href = PDFs / Editor.pdf runat = server
< span class =code-attribute> 样式 = 身高:20px;宽度:25px;填充右:5像素; margin-top:0px; >
< / asp:HyperLink >
< / td >
< / tr >
< ; / div >
。
In a td element block as show below, there are 2 asp.net controls. I want to have space between both, and make the 2nd control (asp:HyperLink here) on the righ-side of the tr block. Could someone help me for its css? Thanks.
<div id="header" dojotype="dijit.layout.ContentPane" region="top">
<tr>
<h1 style="height:30px;" >Locate A Point or A Segment on Route</h1>
</tr>
<tr>
<td cospan="3" style="border-removed olive thick solid; height:15px;">
<asp:Label ID="LabelHeader2" runat="server" Text="WMATA GIS Application" style="width:350px; padding-left:10px;"></asp:Label>
<asp:HyperLink ID="HyperLink3" Text="Help"
ToolTip = "Help for the Application"
href="PDFs/Editor.pdf" runat="server"
style="height: 20px; width: 25px; padding-right:5px; margin-top:0px;">
</asp:HyperLink>
</td>
</tr>
</div>
解决方案
inside TD take one more table like this <table><tr><td>first asp control</td><td>second Asp control</td></tr><table>
And align the first td as left and second as right.It will solve your problem
Use css rule "float:right" on your HyperLink ;)
<div id="header" dojotype="dijit.layout.ContentPane" region="top"> <tr> <h1 style="height:30px;" >Locate A Point or A Segment on Route</h1> </tr> <tr> <td cospan="3" style="border-removed olive thick solid; height:15px;"> <asp:Label ID="LabelHeader2" runat="server" Text="WMATA GIS Application" style="width:350px; padding-left:10px;"></asp:Label> <asp:HyperLink ID="HyperLink3" Text="Help" ToolTip = "Help for the Application" href="PDFs/Editor.pdf" runat="server" style="height: 20px; width: 25px; padding-right:5px; margin-top:0px;"> </asp:HyperLink> </td> </tr> </div> .
这篇关于2个控件之间的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文