0

私は次のレイアウトを持っています:-

html: -

 <header>
    <div class="content-wrapper">
        <div id="headerContainer">
            <div class="headerProfileNotifications">
                <img src="Images/" alt="notification" />
            </div>
            <div class="headerProfilePhoto">
                <img src="Images/" alt="profile_photo" />
            </div>
            <div class="headerProfileDetails">
                <div class="headerProfileName">John Smith</div>
                <div class="headerProfileEmail">john.smith@someemail.co.uk</div>
            </div>
        </div>
    </div>
</header>

およびcss:-

    header {
    padding-bottom: 5px;
   }

    #headerContainer {
    height: 33px;
    background-position: 10px 2px;
    padding-top: 2px;
   }


    .headerProfileNotifications {
    float: right;
    height: 22px;
    width: 29px;
    padding-right: 4px;
    margin: 5px;
   }

    .headerProfilePhoto {
    float: right;
    height: 33px;
    width: 22px;
    margin: 5px;
   }


    .headerProfileDetails {
    float: right;
    padding-right: 4px;
    font-size: 11px;
   }

    .headerProfileName {
    margin-top: 2px;
    float: right;
   }


    .headerProfileEmail {
    margin-top: 0px;
   }

JSFiddle

ただし、見た目は同じで、見た目も同じですChrome/Firefox,が、IE,表示が異なります。

まったく同じように見えるようにするには、何cssを申請する必要がありますかIEChrome/Firefox?

あなたの助けと時間をありがとう

4

1 に答える 1

1

これでうまくいきます:

  .headerProfileEmail {
    clear:both;
    float:right;
    margin-top: 0px;
   }
于 2013-03-25T10:00:07.260 に答える