Note that there are some explanatory texts on larger screens.

plurals
  1. POoverflowed inline element behave different in FF and chrome
    primarykey
    data
    text
    <p>I'm just reading css design pattern of Apache and have an issue about overflowed inline element in a block element.Here is the link</p> <p><a href="http://www.cssdesignpatterns.com/Chapter%2004%20-%20BOX%20MODELS/Inline%20Box/example.html" rel="nofollow">http://www.cssdesignpatterns.com/Chapter%2004%20-%20BOX%20MODELS/Inline%20Box/example.html</a></p> <p>You can see that the inline element with class "box" stays in the same line box in chrome but go to the next line in firefox, while the desired behavior is what firefox does. Can anyone explain for me why there is the difference in firefox and chrome???</p> <p>Here is the html:</p> <pre><code>&lt;div class="container"&gt; &lt;span class="default"&gt;BEFORE&lt;/span&gt; &lt;span class="box"&gt;← Left &amp;nbsp; ↑ Top &amp;nbsp; Bottom ↓ &amp;nbsp; Right → &lt;/span&gt; &lt;span class="default"&gt;AFTER&lt;/span&gt; &lt;/div&gt;​ </code></pre> <p>Here is the css</p> <pre><code>.container { border: 1px solid gray; } .default { line-height: normal; width: auto; height: auto; overflow: visible; visibility: visible; margin: 0; padding: 0; border: none; background-color: gold; } .box { line-height: 100px; margin-left: 100px; margin-right: 100px; padding: 20px 120px; border-left: 5px solid gray; border-right: 5px solid black; border-top: 5px solid gray; border-bottom: 5px solid black; background-color: gold; overflow: scroll; width: 99999px; height: 99999px; margin-top: 99999px; margin-bottom: 99999px; } .default { line-height: normal; width: auto; height: auto; overflow: visible; visibility: visible; margin: 0; padding: 0; border: none; background-color: gold; }​ </code></pre> <p>Here is the fiddle link</p> <p><a href="http://jsfiddle.net/GRwUp/" rel="nofollow">http://jsfiddle.net/GRwUp/</a></p>
    singulars
    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.
 

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