Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 如何根据换行符对齐标签?_Css_Gwt - Fatal编程技术网

Css 如何根据换行符对齐标签?

Css 如何根据换行符对齐标签?,css,gwt,Css,Gwt,我正在创建一个左侧有图标的标签,alreay工作正常: <g:FlowPanel> <g:Image ... /> <g:InlineLabel styleName="{style.label}" /> </g:FlowPanel> 我在找第二种款式。我怎样才能做到这一点 给浮动:左至img 使用(-)减去左边距将图像图标向左移动 为“FlowPanel”提供左侧填充 添加浮动:左应该使标签文本保持为一个块,而不是环绕图标。我会给面板容器

我正在创建一个左侧有图标的标签,alreay工作正常:

<g:FlowPanel>
  <g:Image ... />
  <g:InlineLabel styleName="{style.label}" />
</g:FlowPanel>
我在找第二种款式。我怎样才能做到这一点

  • 给浮动:左至img
  • 使用(-)减去左边距将图像图标向左移动
  • 为“FlowPanel”提供左侧填充

  • 添加<代码>浮动:左应该使标签文本保持为一个块,而不是环绕图标。

    我会给面板容器提供左填充,并将图像置于绝对位置。

    查看flex表格以获得正确的行和列对齐方式。
    x my long
    text
    
    x my long
      text