我基本上是在尝试创建一个带有液体的 2 列 div<h1>
和另一个跨越整个高度的 div <h1>
,但我希望垂直对齐居中。我基本上是在尝试将图像放在页面标题的左侧:
<div class="outer">
<div><img src="pound.png" /></div>
<h1>This is text that is really long. This is text that is really long. This is text that is really long. This is text that is really long. This is text that is really long.</h1>
</div>
这是一个例子;我真的不想使用表格,因为我希望能够在某些情况下将图像浮动到右侧。我也不关心边界,我只是为了说明对齐方式。
------------------------------------------------------
| This is text that is really long. This is
###### | text that is really long. This is text that
###### | is really long. This is text that is really
###### | long. This is text that is really long. This
| is text that is really long.
------------------------------------------------------
我的主要问题是让图像垂直占据整个空间,以便我可以使用 margin: 50% 或 auto 或它的一些变体垂直对齐它。我可以让图像垂直居中,然后文本环绕它,或者我可以让文本不换行,但图像垂直对齐。