Thanks!

I know the reason now, the vertical-align attribute
cannot be put together with float attribute.

2011/1/16 John D <[email protected]>

>  This CSS works:
>
> #test {
>     border: 5px  double #eee;
>     display: table-cell;
>     background-color: #FF0000;
>     height: 300px;
>     width: 400px;
>     margin: 0 auto;
>
>     font-size: 24px;
>     line-height: 36px;
>     vertical-align: middle;
>     text-align: center;
> }
>
> I have ignored branding and instead used only one DIV as follows:
>
> <div id="test"> 在下方键入问题,你将会在最短时间内获得回答。
>
> 更多功能,请见底部导航区。</div>
>
>
> The file is attached for you to test it out.  I am not sure if you can get
> it through this newsgroup.
>
>
> > Hello,
> >
> > I've made a page, but I don't know how
> > to make the top left multi-line text become
> > vertical middle.
> > I want to change the content of the text
> > later, so I want it to be vertical middle by
> > itself.
> >
> > The page:
> >
> > http://www.ffb-all.com/my-test/1.html
> >
> > I've tried
> >
> > #site-description {
> > display: table-cell;
> > float: left;
> > font-size: 24px;
> > line-height: 36px;
> > vertical-align: middle;
> > width: 400px;
> > }
> >
> > and the
> >
> > #branding has height: 300px;
> >
> > but it doesn't work.
> >
> >
> > Thanks!
> > <http://www.ffb-all.com/my-test/1.html>
> >
>
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to