textbox和dropdownlist放在一起,想实现的效果就是让人感觉textbox和dropdownlist连在一起的,可是中间总是有个空格,大家帮忙看看,放两个控件在一起如何使控件之间的间距为0

解决方案 »

  1.   

    用CSS去控制啊 ,设置他们的MARIGN:0PX
      

  2.   

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>无标题页</title>    <script type="text/javascript">
     
        </script></head>
    <body>
        <form id="form1" runat="server">
            <div>
                <div>
                    <div style="float: left;">
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    </div>
                    <div style="padding-left: 0; float: left;">
                        <asp:DropDownList runat="server" ID="d1">
                            <asp:ListItem Text="sssss"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                </div>
            </div>
        </form>
    </body>
    </html>
    05测试可以