<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=386592&amp;view=findpost&amp;p=3410542</guid>
        <pubDate>Wed, 05 Feb 2014 13:00:01 +0000</pubDate>
        <title>Растянуть DIV по ширине картинки</title>
        <link>https://forum.sources.ru/index.php?showtopic=386592&amp;view=findpost&amp;p=3410542</link>
        <description><![CDATA[fatalist: ну ты ж не говорил, что текст должен переноситься...]]></description>
        <author>fatalist</author>
        <category>HTML, CSS</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=386592&amp;view=findpost&amp;p=3410520</guid>
        <pubDate>Wed, 05 Feb 2014 12:24:48 +0000</pubDate>
        <title>Растянуть DIV по ширине картинки</title>
        <link>https://forum.sources.ru/index.php?showtopic=386592&amp;view=findpost&amp;p=3410520</link>
        <description><![CDATA[S.Eugene: Не работает.<br>
<br>
Можете проверить<br>
<a class='tag-url' href='http://codepen.io/anon/pen/rKnld' target='_blank'>http://codepen.io/anon/pen/rKnld</a>]]></description>
        <author>S.Eugene</author>
        <category>HTML, CSS</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=386592&amp;view=findpost&amp;p=3410299</guid>
        <pubDate>Wed, 05 Feb 2014 04:39:37 +0000</pubDate>
        <title>Растянуть DIV по ширине картинки</title>
        <link>https://forum.sources.ru/index.php?showtopic=386592&amp;view=findpost&amp;p=3410299</link>
        <description><![CDATA[fatalist: <s class='tag-s'>width:auto ?</s>  :blink:<br>
display:inline-block; ?  :rolleyes:]]></description>
        <author>fatalist</author>
        <category>HTML, CSS</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=386592&amp;view=findpost&amp;p=3410283</guid>
        <pubDate>Tue, 04 Feb 2014 22:48:26 +0000</pubDate>
        <title>Растянуть DIV по ширине картинки</title>
        <link>https://forum.sources.ru/index.php?showtopic=386592&amp;view=findpost&amp;p=3410283</link>
        <description><![CDATA[S.Eugene: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">div.imgdiv {</div><div class="code_line">&nbsp;&nbsp;float: left;</div><div class="code_line">&nbsp;&nbsp;border: 1px dotted green;</div><div class="code_line">&nbsp;&nbsp;padding: 0.6em;</div><div class="code_line">&nbsp;&nbsp;margin: 0em 1em 1em 0em;</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">&#60;div class=&quot;imgdiv&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;img src=&quot;&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;div class=&quot;imgcaption&quot;&#62;Описание картинки&#60;/div&#62;</div><div class="code_line">&#60;/div&#62;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
Размер картинки неизвестен. Как сделать, чтоб imgdiv растягивался по ширине картинки, но не по ширине текста описания? <br>
<br>
С таблицей так получается, но хочу на дивах сделать.<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">table.imgtable_left {</div><div class="code_line">&nbsp;&nbsp;float: left;</div><div class="code_line">&nbsp;&nbsp;border: 1px dotted green;</div><div class="code_line">&nbsp;&nbsp;padding: 0.6em;</div><div class="code_line">&nbsp;&nbsp;margin: 0em 1em 1em 0em;</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">&#60;table class=&quot;imgtable_left&quot;&#62;&#60;tbody&#62;&#60;tr&#62;&#60;td&#62;</div><div class="code_line">&nbsp;&#60;img src=&quot;&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;div class=&quot;imgcaption&quot;&#62;Описание картинки&#60;/div&#62;</div><div class="code_line">&#60;/td&#62;&#60;/tr&#62;&#60;/tbody&#62;&#60;/table&#62;</div></ol></div></div></div></div> <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2014-02-04T23:12:05+00:00">04.02.14, 23:12</time></span></span><br>
С двумя дивами получается.<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp;div.imgdivtable {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;display: table;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;width: 0px;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;float: left;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;border: 1px dotted green;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;margin: 0em 1em 1em 0em;</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;div.imgdivtd {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;display: table-cell;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;padding: 0.6em;</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;div class=&quot;imgdivtable&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;div class=&quot;imgdivtd&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;img src=&quot;&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;div class=&quot;imgcaption&quot;&#62;Описание картинки&#60;/div&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;/div&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;/div&#62;</div></ol></div></div></div></div><br>
<br>
Можно ли ставить width: 0px;? Не будет ли глюков в каких-то браузерах?<br>
<br>
Можно ли ставить элемент display: table-cell; внутри  display: table; минуя элемент с display: table-row? <br>
Написано, что  для Safari 3.1 значение table-cell не работает, если нет элементов со значениями свойства display: table и table-row.<br>
<br>
Нельзя ли как-то нормально все сделать без костылей?]]></description>
        <author>S.Eugene</author>
        <category>HTML, CSS</category>
      </item>
	
      </channel>
      </rss>
	