1
<!DOCTYPE html>
<html>
    <head>
        <style>
            #other {
                background: #f4e5dc;
                margin-top: 48px;
            }

            .otherIn {
                width: 256px;
                font-family: Georgia;
                display: inline-block;
                margin-left: 28px;
                color: #af182a;

            }

            .otherIn h1 {
                font-family: "FertigoProRegular";
            }
        </style>
    </head>
    <body>
        <div id="other">
            <div id="menu_items" class="otherIn">
                <h1>Menu Items</h1>
                <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam cursus. Morbi ut mi. Nullam enim leo, egestas id, condimentum at, laoreet mattis, massa. Sed eleifend nonummy diam. </p>
            </div>
            <div id="video" class="otherIn">
                <h1>Food Videos</h1>
               <!-- <video width="250" controls preload="none" poster="_images/video_wait.png">
                    <source src="_video/How To Correctly Add Milk to Your Coffee.webm">
                    <source src="_video/How To Correctly Add Milk to Your Coffee.mp4">
                    Jūsu pārlūks neatbalsta audio
                </video> -->
            </div>
            <div id="msg" class="otherIn">
                <h1>Testimonials</h1>
                <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam cursus. Morbi ut mi. </p>
            </div>
        </div>
    </body>
</html>

なぜ、このコードでは、text/div が上からではなく下から始まるのでしょうか? はい、こんな感じです。 http://jsfiddle.net/8W3Gq/embedded/result/ ご協力をお願いいたします....................

4

2 に答える 2

1

あなたのcssでクラスへのvertical-align:top属性を逃したため:.otherIn

デモを参照してください: http://jsfiddle.net/rathoreahsan/8W3Gq/1/

于 2012-07-02T13:09:03.567 に答える
0

vertical-align: top を追加します。cssの.otherInクラスへ

于 2012-07-02T13:09:54.513 に答える