div с текстом над другим, не с IE8 - PullRequest
0 голосов
/ 01 февраля 2012

У меня два div, левый выравнивается с правым.Мне нужно, чтобы левый блок прошел через правый.Как вы знаете, IE все еще является проблемой ... Текст в двух блоках смешан, не перерабатывается, текст кажется независимым.

jsfiddle http://jsfiddle.net/P3Qgb/

Здесь код:

<html>
    <style>
            #root {
                position:fixed;
            }

        #content {
          height: 200px;
          width: 400px;
          border: 1px solid red;    
          position:fixed;
        }    

        #bloc-left {
                position:absolute;
                float: left;
                height: 190px;
                border: 1px solid black;
                width: 60%;
                overflow:auto;

                background-image: linear-gradient(top, #fbfbfb 0%, #e2e2e2 100%);
                background-image: -o-linear-gradient(top, #fbfbfb 0%, #e2e2e2 100%);
                background-image: -moz-linear-gradient(top, #fbfbfb 0%, #e2e2e2 100%);
                background-image: -webkit-linear-gradient(top, #fbfbfb 0%, #e2e2e2 100%);
                background-image: -ms-linear-gradient(top, #fbfbfb 0%, #e2e2e2 100%);
                background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fbfbfb), color-stop(1, #e2e2e2));
        }

        #bloc-right {
                float: right;
                width: 45%;
                height 190px;
                border: 1px solid black;
        }    
    </style>

    <body>
            <div id=""root">
            <div id="content">
             <div id="bloc-left">
              Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
             </div>
          <div id="bloc-right">
              Lorem Ipsum is simply dummy text of the printing and typesetting 
          </div>
      </div>
        </div>

    </body>
</html>

Цель состоит в том, чтобы добавить ссылку, которая расширяет левый блок вправо, с некоторыми js.

Спасибо за вашу помощь!

РЕДАКТИРОВАТЬ: добавитьroot div

1 Ответ

0 голосов
/ 01 февраля 2012

добавить:

z-index: 1; до #bloc-left

изменение:

position: fixed; до position: relative; на #content

...