【问题标题】:HTML/CSS display Elements in nice mannerHTML/CSS 以良好的方式显示元素
【发布时间】:2017-01-26 20:27:58
【问题描述】:

所以,我打扰的原因是,我需要把这些文本框、标签、按钮放在一个漂亮的线上。 对于你们中的一些人来说,这在 CSS 中可能很容易做到,所以请帮助我:D

任何我能读到的参考资料也很好。

额外信息: 网站基于 ASP.NET

EDIT1:

<asp:RadioButtonList ID="radioListRight" runat="server" AutoPostBack="True" RepeatDirection="Horizontal" >
        <asp:ListItem>Recht hinzufuegen</asp:ListItem>
        <asp:ListItem>Recht entfernen</asp:ListItem>
    </asp:RadioButtonList>
    <asp:Label ID="LabelError" runat="server" Font-Bold="True" Font-Size="Large" ForeColor="Red"></asp:Label>

    <br />
    Projekt:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<asp:DropDownList ID="comboProj" runat="server" AutoPostBack="True" Width="140px" Visible="False">
    </asp:DropDownList><br />
    &nbsp;Teilprojekt:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:DropDownList ID="ComboTP" runat="server" Width="136px" Visible="False">
    </asp:DropDownList>
    <asp:Button ID="btnAddTP" runat="server" Text="Hinzufügen" Visible="False" />
    <br />
    <asp:ListBox ID="ListBoxTP" runat="server" Height="164px" Width="422px" Visible="False"></asp:ListBox><br />
    Art der Berechtigungen:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:DropDownList ID="comboBerechtigungsArt" runat="server" Visible="False" AutoPostBack="True">
        <asp:ListItem>Auswählen...</asp:ListItem>
        <asp:ListItem Value="CHECK-IN / CHECK-OUT"></asp:ListItem>
        <asp:ListItem>CHECK-OUT</asp:ListItem>
        <asp:ListItem>CHECK-IN</asp:ListItem>
    </asp:DropDownList><br />
    Berechtigungen eintragen für&nbsp;&nbsp;&nbsp;<asp:TextBox ID="TextBoxUser" runat="server" Width="151px" placeholder="HendrikHeim" Visible="False"></asp:TextBox>
    <asp:Button ID="btnAddUser" runat="server" Text="Hinzufügen" Visible="False" />
    <br />
    &nbsp;<asp:Label ID="labelEmail" runat="server" Text="EMail"></asp:Label>



【问题讨论】:

标签: html css asp.net stylesheet


【解决方案1】:

不要使用表格,使用 CSS 和 'div' 节点来包装内容和显示样式以将数据内联。

使用http://www.w3schools.com/

作为 CSS 的来源

如果浏览器宽度变窄,表格将无法正确流动,放入单个标签将允许浏览器正确设置布局样式。

将元素放在同一行:

    <div style="display:inline;width:80px;">content here</div>
    <div style="display:inline;width:100px;">content here</div><br />

然后您可以通过添加更多样式、宽度等来固定列的宽度。

如果你不熟悉 CSS,那就花点时间学习吧。

【讨论】:

  • 那么有什么命令可以将它们全部放在一起呢?例如输入文本框?
  • 不确定你在问什么/
  • 就像在每一个Button之间都是一样的。
  • 对不起,我不明白你想说什么。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-08
  • 2014-12-22
  • 1970-01-01
  • 2010-09-26
相关资源
最近更新 更多