代码之家  ›  专栏  ›  技术社区  ›  Soham Dasgupta

HTML表格td对齐

  •  0
  • Soham Dasgupta  · 技术社区  · 14 年前

    我在td元素中有三个按钮。现在所有的按钮都是垂直对齐的。如何在不使用嵌套表的情况下水平对齐它们。

    3 回复  |  直到 7 年前
        1
  •  1
  •   Marc Andreson    14 年前

    尝试使用无序列表(UL)和水平对齐的列表元素(LI)。

    举个例子: http://css.maxdesign.com.au/listamatic/horizontal01.htm

        2
  •  1
  •   Narcis Radu    14 年前

    使用CSS:

    float:left for 每个按钮

        3
  •  1
  •   Salil    14 年前

    使用属性float left的div

    <div style="float:left">
      button1
    </div>
    
    <div style="float:left">
      button2
    </div>
    
    <div style="float:left">
      button3
    </div>