Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery: accordion heightStyle: fill causing vertical scrollbar
    primarykey
    data
    text
    <p>I just recently added the JQuery accordion affect to my site and applied the heightStyle: fill so that it would fill up the entire window.</p> <p>However, it's filling up what looks like an extra 1px or maybe 2px, and now it's causing the vertical scroll bar to appear. I'm thinking I have extra padding that may be causing it, or some margin somewhere, but I've tried everything and can't seem to figure out where the extra pixel or two are coming from.</p> <p><strong>Can you guys figure out where?</strong> I just want to get rid of it so that it fills the entire page, but doesn't cause the vertical scrollbar.</p> <p><strong>Live Example:</strong> <a href="http://jsfiddle.net/r2Vra/" rel="nofollow">http://jsfiddle.net/r2Vra/</a> (If you resize the result window you will need to re-run)</p> <p><strong>HTML:</strong></p> <pre><code>&lt;body&gt; &lt;div id="palette"&gt; &lt;div id="accordion"&gt; &lt;h3&gt;Upper Case&lt;/h3&gt; &lt;div id="upperCase"&gt;&lt;/div&gt; &lt;h3&gt;Lower Case&lt;/h3&gt; &lt;div id="lowerCase"&gt;&lt;/div&gt; &lt;h3&gt;Numbers&lt;/h3&gt; &lt;div id="numbers"&gt;&lt;/div&gt; &lt;h3&gt;Punctuation&lt;/h3&gt; &lt;div id="punctuation"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="canvas"&gt; &lt;div id="trash"&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/div&gt; &lt;/div&gt; &lt;/body&gt; </code></pre> <p><strong>CSS:</strong></p> <pre><code>/**************************************************************************************** * GENERAL *****************************************************************************************/ html, body { height: 100%; margin: 0; padding: 0; } /**************************************************************************************** * PALETTE *****************************************************************************************/ #palette { float: left; width: 320px; height: 100%; background-color: #888; padding: 0 5px; background: url(../img/texture.png) repeat; } #palette .letter { font-family: 'Chango', cursive; display: inline-block; font-size: 4em; text-shadow: 2px 2px 1px rgba(0, 0, 0, 1); cursor: move; } /**************************************************************************************** * CANVAS *****************************************************************************************/ #canvas { margin-left: 320px; height: 100%; z-index: 0; background: url(../img/refrigerator.jpg) no-repeat center center fixed; background-position: left 200px center; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } #canvas .newLetter { font-family: 'Chango', cursive; display: inline-block; font-size: 4.4em; text-shadow: 2px 2px 1px rgba(0, 0, 0, 1); cursor: move; } #trash { position:fixed; right:0; bottom:10px; z-index: 100; } #trash a{ display: block; background: url(../img/trashcan-sprite-tiny2.png) no-repeat; height: 110px; width: 125px; } #trash a:hover{ background-position: 0px -113px; } #trash img { border: none; } /**************************************************************************************** * JQUERY UI CSS OVERRIDE *****************************************************************************************/ #accordion .ui-accordion-content { padding: 0 .5em; } /* .ui-helper-reset { line-height: 1.2; } .ui-widget { font-size: 1em; } */ </code></pre> <p><strong>JavaScript:</strong></p> <pre><code>$(function() { $( "#accordion" ).accordion({ heightStyle: "fill" }); }); </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.
    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