Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS div length is too big
    text
    copied!<p>How can I make a CSS div which width is as tall as the text it contains? I tried</p> <pre><code>div.reqspace { float : left; width : 10px; } </code></pre> <p>but found that there is no length attribute. Now my div is almost as wide as the screen is.</p> <pre><code> &lt;?php include("sitestartend.php"); site_start('xyz);?&gt; &lt;?php include("helpfun.php"); $addr = getRealIpAddr(); if ($addr != '$myaddr') { echo '&lt;p&gt;Sivusto on kehitteillä.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;'; die(); } include("navbar.php"); ?&gt; navbar ladattu! &lt;div id="reqspace"&gt; Sähköpostiosoite: &lt;br/&gt; Valitse salasanasi: &lt;br/&gt; &lt;/div&gt; &lt;input type="text" name="email" value="" /&gt; &lt;input type="text" name="email" value="" /&gt; &lt;input type="password" name="password" value="" /&gt; &lt;input type="submit"/&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>sitestartend.php</p> <pre><code>&lt;?php function site_start($name) { echo '&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;'; echo '&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;'; echo '&lt;head&gt;'; echo ' &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;/meta&gt;'; echo ' &lt;title&gt;'.$name.'&lt;/title&gt;'; echo ' &lt;link type="text/css" rel="stylesheet" href="styles.css" /&gt;'; echo '&lt;/head&gt;'; echo '&lt;body&gt;'; } function site_end() { echo '&lt;/body&gt;\n&lt;/html&gt;'; } </code></pre> <p>helpfun.php</p> <pre><code>&lt;?php function getRealIpAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet { $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy { $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip=$_SERVER['REMOTE_ADDR']; } return $ip; } ?&gt; </code></pre>
 

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