Css
======================css=======================
. holder{
width:740px;
height:300px;
border:1px solid #777;
Text-align:center;
Display:table-cell;
Vertical-align:middle;
}
/* The following styles are for ie*/
. edge{
width:0;
height:100%;
Display:inline-block;
Vertical-align:middle;
}
. container{
Vertical-align:middle;
Display:inline-block;
}
================================================
====================html=======================
Test content test content test content test content test content test content test content test content test content test contents test content content Test content
=================================================
The code changed a little bit. There are two points to be aware of:
The tab of the IE conditional annotation section in HTML should be labeled with an inline object.
" "to be placed before the content. If the content is in Chinese, it will not be centered.