【问题标题】:How can I design html like this? [closed]我怎样才能设计这样的html? [关闭]
【发布时间】:2011-08-03 18:09:19
【问题描述】:

如何将我的 div(“个人信息”部分)设计为如下例所示。

【问题讨论】:

  • 尝试阅读一些叫做 CSS 和 HTML 的东西
  • @Calum 这样的评论根本没有帮助。
  • 您好,问题已关闭,所以我无法回答。这也不是最好的方法,但是,这是我能想到的:jsfiddle.net/BTJLB

标签: html css forms


【解决方案1】:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Title</title>
    <style type="text/css">
      .personal_information label { display: inline-block; padding-right: 10px; text-align: right; width: 200px; }
    </style>
  </head>
  <body>
    <div class="personal_information">
      <h1>Booking</h1>
      <fieldset>
        <legend>Personal Information</legend>
        <label for="first_name">First Name</label><input id="first_name" name="first_name" /><br />
        <label for="last_name">Last Name</label><input id="last_name" name="last_name" />
      </fieldset>
    </div>
  </body>
</html>

【讨论】:

  • 谢谢斯泰西。我明白了 =)
【解决方案2】:

这可能是&lt;fieldset&gt;。

【讨论】:

  • 谢谢。这就是我需要知道的。知道可以用html/css存档,就是不知道怎么叫。
猜你喜欢
  • 2022-12-08
  • 2021-07-12
  • 1970-01-01
  • 2023-03-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-05-06
  • 2012-09-03
相关资源
最近更新 更多