Note that there are some explanatory texts on larger screens.

plurals
  1. POhtml table cellspacing now working within div
    text
    copied!<p>I have this code for a table which is very simple:</p> <pre><code> &lt;table cellspacing="10" cellpadding="10"&gt; &lt;tr&gt; &lt;td&gt;&lt;div id="mini_window"&gt;&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div id="mini_window"&gt;&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;div id="mini_window"&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>This table code is within this div: </p> <pre><code>#body_content { top: 30%; left: 36%; width:70%; height:18em; margin-top: -9em; /*set to a negative number 1/2 of your height*/ margin-left: -15em; /*set to a negative number 1/2 of your width*/ border-bottom: 1px solid #ccc; border-top: 1px solid #ccc; /*background-color: #f3f3f3;*/ position:fixed; direction: rtl; } </code></pre> <p>and within the table cells, there is the mini_window div that is:</p> <pre><code>#mini_window { top: 50%; width:150px; height:150px; margin-top: 20px; /*set to a negative number 1/2 of your height*/ /*border-bottom: 1px solid #ccc;*/ /*border-top: 1px solid #ccc;*/ border: 1px solid black; background-color: #f3f3f3; /*direction: rtl;*/ } </code></pre> <p>It looks like the attached picture and that is not what I wanted. I need between each div say 20px more or less. What is going wrong?</p> <p>Thank you, <img src="https://i.stack.imgur.com/vq4JE.png" alt="enter image description here"></p> <p>UPDATE: Include the whole source of that page:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;?php include_once('required_css.php'); ?&gt; &lt;?php include_once('required_js.php'); ?&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;/head&gt; &lt;body&gt; &lt;?php include_once('header.php'); ?&gt; &lt;div id="body_content"&gt; &lt;h1&gt;ما الجديد؟&lt;/h1&gt; &lt;table cellspacing="10" cellpadding="10"&gt; &lt;tr&gt; &lt;td&gt;&lt;div id="mini_window"&gt;&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;div id="mini_window"&gt;&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;div id="mini_window"&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&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