Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy won't the Android browser span this paragraph over the full browser width?
    primarykey
    data
    text
    <h2>The Problem:</h2> <p><img src="https://i.stack.imgur.com/B19Da.png" alt="enter image description here"></p> <hr> <h2>The Question</h2> <p>The paragraph will fill the complete width of the page in </p> <ul> <li>Firefox</li> <li>Firefox Mobile (tested with 4.0.3 on SGS2)</li> <li>Chrome</li> <li>Chrome Mobile Beta (tested with 4.0.3 on SGS2)</li> <li>Internet Explorer</li> <li>Internet Explorer Mobile (testes with Windows Phone Emulator)</li> <li>Opera Mobile (tested with 4.0.3 on SGS2)</li> <li>Android native browser (tested with 4.0.3 on SGS2 and Android emulator)</li> </ul> <p>What do I have to do so it does the same in the default Android browser?</p> <hr> <h2>I tried:</h2> <p>Please note that this example is reduced to show the problem which I have on a much larger page. So I would like the solution to be as little disruptive as possible. For example, setting <em>all</em> paragraphs on my site to float seems like a bad idea.</p> <h3><code>width</code></h3> <p>Increasing the value of the <code>width</code> property on the <code>p</code> CSS class has no effect.<br> Relative values: <code>100%</code> and <code>1000%</code> have no effect. Values &lt;100% have an effect (paragraph becomes thinner).<br> Absolute values: <code>1000px</code> doesn't expand the width, low values decrease it though.</p> <h3><code>float</code></h3> <p>When setting <code>float : right;</code> on the paragraph, it will display as desired:<br> <img src="https://i.stack.imgur.com/YhV1M.png" alt="enter image description here"></p> <h3>CSS Reset</h3> <p>When I insert these <a href="http://meyerweb.com/eric/tools/css/reset/" rel="nofollow noreferrer">CSS Reset</a> styles, the width of the paragraph is unaffected.</p> <h3><code>position</code></h3> <p>When setting <code>position</code> to <code>absolute</code> on the paragraph, it will display as desired. But I'm unsure if that would be safe to generally have enabled.</p> <hr> <h2>The Source:</h2> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;Android Browser Issue&lt;/title&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;style&gt; body { border : 3px dotted green; margin : 0; padding: 0; } p { border : 3px solid red; margin : 0; padding: 0; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt;Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.&lt;/p&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>You can see it here: <a href="http://jsfiddle.net/EYcWL/embedded/result/" rel="nofollow noreferrer">http://jsfiddle.net/EYcWL/embedded/result/</a> or go there directly: <img src="https://i.stack.imgur.com/UOzlh.png" alt="enter image description here"></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.
 

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