如何在asp.net中对齐标签和文本框?

时间:2016-11-24 01:36:45

标签: css asp.net vb.net

This is the output

我使用空格来对齐标签,但它没有正常工作。 我还将所有标签放入面板中以使其水平对齐。  我的代码看起来像这样

<?php
    $array = ....
    $documentation = [];
    foreach($array['Transaction'] as $transaction)
    {
        $extref = $transaction['extref'];
        if(!isset($documentation[$extref]))
            $documentation[$extref] = [];
        $documentation[$extref] = array_merge($documentation[$extref], $transaction['Documentations']['Documentation'] )
    }

    $o = [];
    foreach($documentation as $key => $value)
    {
        $o[]=array('extref' => $key, 'Documentations' => array('Documentation' => $value));
    }

    return array('Transaction' => $o);

2 个答案:

答案 0 :(得分:0)

Bro看看并对此有更深入的了解,因为其他人说在ASP.Net中很难对齐,所以我在你的代码中添加了一个标记HTML。

这是

Align controls properly

答案 1 :(得分:0)

您可以使用Width属性设置控件的宽度(例如,对于150像素宽的控件,宽度=“150”),这反过来将创建相应的内联CSS。这是快速修复版本。

如果您想要更长远的方法,请考虑学习HTML5和CSS。这是一个可以为您提供基础知识的网站。

http://howtocodeinhtml.com/