English 中文(简体)
CSS 表格标签问题
原标题:CSS Form Alignment Issue
  • 时间:2011-08-16 01:50:34
  •  标签:
  • html
  • css

我正在陷入困境,边际和顶部似乎不可行。 并调整我的形式。 我希望形式(label-> 投入箱)低于背景的逻辑框架。

目前,我有:

<>光>:

    <div class="column-right-login">
          <form action="http://www.domain.co.nz/login" method="post" enctype="multipart/form-data" id="homeLogin">
             <label for="email">Email Address: </label><input type="text" name="email" value="" />
             <label for="password">Password: </label><input type="password" name="password" value="" />
              <br />
              <a href="http://www.domain.co.nz/forgot-password">Forgotten Password</a><br />
              <br />
              <a onclick="$( #login ).submit();" class="button"><span>Login</span></a>
          </form>
    <script type="text/javascript"><!--
    $( #login input ).keydown(function(e) {
        if (e.keyCode == 13) {
            $( #login ).submit();
        }
    });
    //--></script>   

</div>

CSS:

    .column-right-login{
    background:url( ../image/login.png ) no-repeat;
    width:335px;
    height:154px;
}

例:

“entergraph

<>Update:

I now have the code below but I cannot get my form to align:

<>光>:

<div class="column-right-login">
          <form action="http://www.domain.co.nz/login" method="post" enctype="multipart/form-data" id="homeLogin">
             <label for="email">Email Address: </label><input type="text" name="email" value="" />
             <label for="password">Password: </label><input type="password" name="password" value="" />
              <a href="http://www.domain.co.nz/forgot-password">Forgotten Password</a>
              <a onclick="$( #login ).submit();" class="button"><span>Login</span></a>
          </form>
    <script type="text/javascript"><!--
    $( #login input ).keydown(function(e) {
        if (e.keyCode == 13) {
            $( #login ).submit();
        }
    });
    //--></script>   

</div>

CSS:

.column-right-login{
    background:url( ../image/login.png ) no-repeat;
    width:335px;
    height:154px;
    padding: 30px 0px 0px 10px; /* top right bottom left */
}

例:

enter image description here

最佳回答

也许,你希望利用dding:

.column-right-login{
 background:url( ../image/login.png ) no-repeat;
 width:335px;
 height:154px;
 padding: 80px 0px 0px 50px; /* top right bottom left */
 }

请知道,婚礼会增加高/高,因此,你必须加以调整(根据你目前用于婚礼的胎数计算,例如,我的 example=335 - 50,高=154 - 80)。

如果你想在形式上使用差值,而不是工作,那么,仅增加一点。

  display: block;

页: 1 我不记得它是否违约——4AM :

最新资料:

为了在你想要的时候提出你们的意见,我建议打上包装标签并投入零件。 然后,你可以通过使用差额来调整立场。

   <div style="margin-left: 40px;"><label1 ...><input ...></div>
   <div><label2 ...><input ...></div>

当然,为社会保障局树立风格: 希望这将为你工作。

问题回答

不必说话,而是看上你的<条码>背井离乡

T:

.column-right-login{
    background:url( ../image/login.png ) no-repeat;
    background-position: 0% 20%;  //HERE
    width:335px;
    height:154px;
}

这把图像保存在左边——头0%——并降幅20%。

显然,你可以调整数字。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签