Note that there are some explanatory texts on larger screens.

plurals
  1. POwhite-space:nowrap breaks display:table
    primarykey
    data
    text
    <p>I am about to go crazy. I used the search and google, but could not come up with a solution, it won't work :(</p> <p>I have a div nested in other divs for automatically vertical centering and for the background. Originally it fits vertically several images and resizes them dynamically. I use several css styles according to the number of pictures (width, padding).</p> <p>But for this gallery I have to much pictures, the original layout breaks into several lines, but I want a nested "white-space:nowrap" with overflow-x: auto; in my div. So I can scroll them, but "white-space:nowrap" blows the whole stuff an breaks all the display:table attributes.</p> <p>I suppose this should happen? But then I need an otehr solution or a least a kind hint.</p> <p>I also made a simplified fiddle: <a href="http://jsfiddle.net/x696B/9/" rel="nofollow">http://jsfiddle.net/x696B/9/</a> if you remove the display table attributes it works, and scrolls. I need that in my div. :D</p> <p>Here is my nooby css (relevant part)</p> <pre><code>html { height:100%; } body { height:98%; background-color: #FFF9E5; padding: 0px; } .wrapper { margin:auto; padding: 0px; z-index: 0; height:100%; width:100%; display:table; vertical-align:middle; } .outer { z-index: 0; padding: 0px; display:table-cell; vertical-align:middle; background-color: #FFF9E5; } div.container { margin: 0 auto; display:table; z-index: 0; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; width:60%; background-color: #867F27; padding-right:1%; padding-left:1%; white-space: nowrap; overflow: auto; } .view { width:100%; white-space: nowrap; overflow-x: auto; margin: 0 auto; text-align: left; } </code></pre> <p>If I mark display:table and display:table-cell as comment the gallery looks good and scrolls but it is not centered. (got other divs with logo, etc)</p> <p>here is my html</p> <pre><code>&lt;meta http-equiv="X-UA-Compatible" content="IE=9" /&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html lang="de"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;my page&lt;/title&gt; &lt;style type="text/css"&gt; @import url("style.css"); &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="wrapper"&gt; &lt;div class="outer"&gt; &lt;div class = "logo"&gt;&lt;img src="logo.png"/&gt;&lt;/img&gt;&lt;/div&gt; &lt;div class="container"&gt; &lt;div class="view"&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-1.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-2.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-3.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-4.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-5.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-6.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-7.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-8.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-9.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-1.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-2.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-3.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-4.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-5.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-6.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-7.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-8.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-9.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-1.jpg"/&gt; &lt;img src="http://lorempixel.com/output/nature-q-c-205-154-2.jpg"/&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>oh and forgive me this dumb question, up to now this forum was a big help, but now I lost.</p> <p>thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload