« 12月 2012 2月 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

Profile

Mobile

  • CSSでのポジション指定時にIE6でズレてしまう
  • 2010.02.19
  • position:relative;とposition:absoluteで位置指定した際、IE6でズレる :shock:


    しばらくハマってしまったが、親要素にwidth:100%を入れる事で無事解決!



    htmlソース

    <div class=”bt_keisan”>

    <p>(ボタンの右に表示する文字)</p>

    <input type=”hidden” name=”action” value=”calculate” />

    <input type=”submit” value=”ボタン” />

    </div>


    CSSソース

    .bt_keisan {

    text-align:center;

    margin:10px 0 0 ;

    position:relative;

    width:100%;

    }


    .bt_keisan p {

    position:absolute;

    left:50%;

    top:50%;

    margin:-8px 0 0 40px;

    }



【この記事のタグ】
CSS

Leave a Reply

Page Top