Note that there are some explanatory texts on larger screens.

plurals
  1. POGaps between an img & a div
    primarykey
    data
    text
    <p>I have div that contains a img element then directly below that is a div element then below that is another img element.</p> <p><strong>My Problem:</strong> there should be no vertical gaps between any of those elements. But what happens is that there is a 10/20px vertical gap between the middle div &amp; the imgs(on top &amp; bottom).</p> <p><strong>How do I remove the vertical gap between the inner div &amp; the 2 img elements?</strong></p> <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;!-- InstanceBegin template="/Templates/homepage.dwt" codeOutsideHTMLIsLocked="false" --&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;style type="text/css"&gt; &lt;!-- /* Test Specific */ /*Perform CSS Reset*/ html, body, div, form, fieldset, legend, label, img { margin: 0; padding: 0; } table { border-collapse: collapse; border-spacing: 0; } th, td { text-align: left; } h1, h2, h3, h4, h5, h6, th, td, caption { font-weight:normal; } img { border: 0; } .pageBox { width: 700px; display: block; } .pageBoxContent { background: url("images/pageBoxMid.png") repeat-y; background-color: red; padding-right: 50px; padding-left: 50px; width: 700px; } .pageBoxContent p { font-family:Calibri, "Myriad Pro", Serif; } .pageBoxTop { background-color: blue; } .pageBoxBottom { background-color: blue; } --&gt; &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt; &lt;div class="pageBox"&gt; &lt;img class="pageBoxTop" src="images/pageBoxTop.png" alt=""/&gt; &lt;!-- Gap appears here on display --&gt; &lt;div class="pageBoxContent"&gt; &lt;p class="subHeading"&gt;Upcoming Events&lt;/p&gt; &lt;p&gt;abcedefdfdgdf&lt;/p&gt; &lt;p&gt;abcedefdfdgdf&lt;/p&gt; &lt;p&gt;abcedefdfdgdf&lt;/p&gt; &lt;p&gt;abcedefdfdgdf&lt;/p&gt; &lt;/div&gt; &lt;!-- Gap appears here on display --&gt; &lt;img class="pageBoxBottom" src="images/pageBoxBottom.png" alt=""/&gt; &lt;/div&gt; &lt;br/&gt; &lt;br/&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    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.
 

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