代码之家  ›  专栏  ›  技术社区  ›  jwaliszko

乳胶表单元格内容垂直对齐问题

  •  3
  • jwaliszko  · 技术社区  · 16 年前

    \begin{tabular}{l|p{3cm}}
        \rule{2cm}{5cm} & Top align content ? \\
    \end{tabular}
    

    2 回复  |  直到 16 年前
        1
  •  3
  •   Alexey Malistov    16 年前

    回答第二个问题 单元格顶部对齐。

    \begin{tabular}{|l|}  
        \hline text \\ text \\ text\\ text \\ \hline 
    \end{tabular}
    

    然后你得到一个中心对齐的桌子。

    \begin{tabular}{p{1cm}|p{3cm}}  
        \vtop{\vskip 0pt \vskip -\ht\strutbox 
        \begin{tabular}{|l|}  
            \hline text \\ text \\ text\\ text \\ \hline 
        \end{tabular}\vskip -\dp\strutbox }%
        & Top align content ? \\  
    \end{tabular} 
    
        2
  •  2
  •   Alexey Malistov    16 年前
    \begin{tabular}{l|p{3cm}} 
        \vrule width 2cm height \ht\strutbox depth 5cm & Top align content ! \\ 
    \end{tabular}