Jump to content
  • 0

div внутри table


maximt
 Share

Question

делаю заготовку галереи. задумка такая, div-контейнер с width=100% растягивается на всю ширину страницы. внутри контейнера div-wapper с img.

картинок очень много и все, что не влезло в контейнер должно скрыться с помощью overflow:hidden

.slide_container
{
border:1px solid #DDDDDD;
overflow:hidden;
width:100%;
}
.slide_wrapper
{
white-space: nowrap;
}

<div class="slide_container">
<div class="slide_wrapper">
<img src="/1_image.jpg" alt="">
<img src="/2_image.jpg" alt="">
<img src="/3_image.jpg" alt="">
<img src="/4_image.jpg" alt="">
<img src="/5_image.jpg" alt="">
<img src="/6_image.jpg" alt="">
<img src="/7_image.jpg" alt="">
<img src="/8_image.jpg" alt="">
<img src="/9_image.jpg" alt="">
<img src="/10_image.jpg" alt="">
</div>
</div>

пример работает.

но когда встроил его в шаблон кмс, наткнулся на проблему - перестает работать внутри таблицы..

div-контейнер оборачивает весь wrapper, отображая все картинки, что не влезли, и растягивает таблицу

<table width="100%" >
<tr>
<td>left</td>
<td>
center
<div class="slide_container">
<div class="slide_wrapper">
<img src="/1_image.jpg" alt="">
<img src="/2_image.jpg" alt="">
<img src="/3_image.jpg" alt="">
<img src="/4_image.jpg" alt="">
<img src="/5_image.jpg" alt="">
<img src="/6_image.jpg" alt="">
<img src="/7_image.jpg" alt="">
<img src="/8_image.jpg" alt="">
<img src="/9_image.jpg" alt="">
<img src="/10_image.jpg" alt="">
</div>
</div>
</td>
<td>right</td>
</tr>
</table>

подскажите как выкрутиться? переверстать шаблон - нельзя

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

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