Tag: 垂直alignment

垂直alignment图像旁边的文字?

为什么不vertical-align: middle工作? 然而, vertical-align: top工作。 <div> <img style="width:30px;height:30px"> <span style="vertical-align:middle">Doesn't work.</span> </div>

如何垂直alignment一个div内的图像?

题 你如何alignment一个包含div的图像? 例 在我的例子中,我需要将<div>的<img> <div>与class ="frame ”`垂直居中: <div class="frame" style="height: 25px;"> <img src="http://jsfiddle.net/img/logo.png" /> </div> .frame的高度是固定的,图像的高度是未知的。 如果这是唯一的解决scheme,我可以在.frame添加新的元素。 我试图在IE≥7,Webkit,Gecko上做到这一点。 在这里看到jsfiddle: http : //jsfiddle.net/4RPFa/61/

元素在一个div中的垂直alignment

我有一个div与两个图像和一个h1 。 所有这些都需要在div内相互垂直alignment。 其中一个图像需要在div内absolute定位。 在所有常见的浏览器上,这个工作所需要的CSS是什么? <div id="header"> <img src=".." ></img> <h1>testing…</h1> <img src="…"></img> </div>

在div中垂直alignment文本

我正在尝试find最有效的方式来alignment文本与div。 我已经尝试了一些东西,似乎没有工作。 .testimonialText { position: absolute; left: 15px; top: 15px; width: 150px; height: 309px; vertical-align: middle; text-align: center; font-family: Georgia, "Times New Roman", Times, serif; font-style: italic; padding: 1em 0 1em 0; }

我如何垂直居中文本与CSS?

我有一个包含文本的div元素,我想将这个div的内容垂直居中。 这是我的div风格: #box { height: 170px; width: 270px; background: #000; font-size: 48px; color: #FFF; text-align: center; } <div Id="box"> Lorem ipsum dolor sit </div> 什么是最好的方法来做到这一点?

如何垂直居中所有浏览器的div?

我想用CSS垂直居中div。 我不想要表或Javascript,但只有纯CSS。 我find了一些解决scheme,但都缺less对Internet Explorer 6的支持。 <body> <div>Div to be aligned vertically</div> </body> 如何在所有主stream浏览器(包括Internet Explorer 6)中垂直居中div?

如何在另一个<div>中水平居中<div>?

我怎样才能水平居中使用CSS的另一个<div>一个<div> (如果它甚至可能)? <div id="outer"> <div id="inner">Foo foo</div> </div>

如何居中alignment自举容器

我正在寻找一种方法来垂直居中alignmentjumbotron的container div,并将其设置在页面中间。 .jumbotron必须适应屏幕的整个高度和宽度,所以我使用了这个CSS。 .jumbotron{ heght:100%; width:100%; } .container div的宽度为1025px ,应该在页面的中间(垂直居中)。 .container{ width:1025px; } .jumbotron .container { max-width: 100%; } 我的HTML就像 <div class="jumbotron"> <div class="container text-center"> <h1>The easiest and powerful way</h1> <div class="row"> <div class="col-md-7"> <div class="top-bg"></div> </div> <div class="col-md-5 iPhone-features" style="margin-left:-25px;"> <ul class="top-features"> <li> <span><i class="fa fa-random simple_bg top-features-bg"></i></span> <p><strong>Redirect</strong><br>Visitors where they converts more.</p> </li> […]