Jump to content
  • 0

Абсолютное позиционирование div в ячейке


Prokopov Nikolai
 Share

Question

11 answers to this question

Recommended Posts

  • 0
Буду признателен если продемонстрируете пример или дадите ссылку где можно посмотреть как это делается!

Если речь именно о ячейках таблицы могут быть проблемы с кроссбраузерностью у элементов, дисплей которых тейбл, в этом случае кое какие браузеры не позволят назначить ячейке релейтив и как следствие быть родителем абсолютного блока. о как! =)

Link to comment
Share on other sites

  • 0

to Justnewone,

Посмотрите пожулайста мой сайт - www.prokopov-nikolai.ru.

Я там использовал свойство position:relative и вспомогательные top, left. Проблема теперь с отображением в IE. Значение top в EI отличается от значения в FF.

Можно как-то сделать свое оформление для IE?

Link to comment
Share on other sites

  • 0
to Justnewone,

Посмотрите пожулайста мой сайт - www.prokopov-nikolai.ru.

Я там использовал свойство position:relative и вспомогательные top, left. Проблема теперь с отображением в IE. Значение top в EI отличается от значения в FF.

Можно как-то сделать свое оформление для IE?

Посмотрел. Сходу искать где какой релейтив и прочее не удалось, страница выглядит несуразно. Поясни подробнее.

Edited by Justnewone
Link to comment
Share on other sites

  • 0

Вот код ячейки, в которой я задаю свое меню (div-ы) посредство relative.

Суть в следующем значение top основного div.content в браузерах FF и IE отображается поразному. Как сделать для каждого свое оформление или так, чтобы отображались одинаково?

<td valign="top" background="http://prokopov-nikolai.ru/application/maxsite/templates/my/images/fon-bottom.jpg" style="background-repeat: no-repeat;">
<div class="gray" style="position: relative; left: -30px; width: 150px; float: right;">
<a style="font-size: 28px;" target="_self" title="О себе" href="/page/about/">О себе</a>
</div>
<div class="gray" style="position: relative; left: -780px; top: 120px; width: 140px; float: right;">
<a style="font-size: 38px;" target="_self" title="flash" href="/category/flash/">flash</a>
</div>
<div class="gray" style="position: relative; left: 290px; top: 300px; width: 120px; float: right;">
<a style="font-size: 32px;" target="_self" title="office" href="/category/office/">office</a>
</div>
<div class="content" style="position:relative; top:-20px; left:200px; height:595px; width:770px; text-align:center;">
<br/>
<div style="font-size: 32px; position: absolute; left: 100px; top: 230px;">Богатство мира - в оригинальных людях.</div>
<br/>
<div style="font-size: 26px; position: absolute; left: 500px; top: 280px;">Томас Карлейль</div>
</div>
<div class="gray" style="position: relative; left: -780px; top: -40px; width: 80px; float: right;">
<a style="font-size: 30px;" target="_self" title="web" href="/category/web/">web</a>
</div>

</td>

Link to comment
Share on other sites

  • 0

как спозиционировать относительно нижней гриницы ячейки - это проблематично.

А вот относительно левой - верхней - правой легко.

В ячейку сунь див, ячейке vertical-align:top. Он станет вверху и займет всю ширину. Вот ему релейтив, а в него блок с абсолютом.

А с <td> уберите релейтив.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy