Open ghost opened 8 years ago
ah yeah i see what you mean. can you add a test case or a jsfiddle showing the issue as well? that'll help me verify the fix
I think, that i have a problem of one of my script, because i can not reproduced the padding problem outside of my site, but this is an example of the "wrong box":
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Columnizer JQuery Plugin sample page 2</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="Matt Wilson">
<!-- Date: 2008-07-12 -->
<style>
.column{ padding: 5px; }
body { font-size: 9pt; }
#wrapper { margin: 0px 100px; padding: 100px; border-style: solid; border-width: 5px; }
.wide { clear:both; }
</style>
<script src="https://raw.githubusercontent.com/adamwulf/Columnizer-jQuery-Plugin/master/src/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="https://raw.githubusercontent.com/adamwulf/Columnizer-jQuery-Plugin/master/src/jquery.columnizer.min.js" type="text/javascript" charset="utf-8"></script>
<script>
$(function(){
$('.wide').columnize({ width:300 });
});
</script>
</head>
<body>
<div id="wrapper">
<div class="wide">
<h1>Lorem ipsum ne justo</h1>
<p>Bonorum has. His ut cibo quas tantas, vis ut probo adhuc definiebas, has at meis debet vulputate. No sed velit essent suavitate, in pro decore <a href='javascript:;'>ceteros temporibus</a>, usu in odio offendit theophrastus. Mel labore indoctum cu, ad soleat admodum delicatissimi sed, mei viris tritani ullamcorper eu. Ut vim simul aperiam.</p>
<ul>
<li>Hellow</li>
<li>bye</li>
</ul>
<p>Eu eleifend repudiandae has. Mea eu ridens aliquam. Nisl aeque sit ut, posse dolor utinam cum in. Ad timeam sapientem eos, et eripuit inermis nam. Eos integre voluptaria ne, iriure concludaturque ut eum.</p>
<p>Vis erant intellegat in. Soleat legere no ius, usu ex laoreet molestie. Sit <a href='javascript:;'>eu sint inermis</a>. Ea zzril scribentur pro.</p>
<h1>Tempor essent appetere</h1>
<p>Ius mutat commune expetendis in. Nam et quas sensibus <a href='javascript:;'>reprimique</a>, vix no erat soluta suavitate. At mel eius dictas latine. Corrumpit inciderint reformidans sed no, no usu omnis utinam noluisse.</p>
<p>Sit et, an ius nihil apeirian. Eu posse tempor iuvaret cum. No diam dolor sea, postea mnesarchum ne ius, vel no utinam ignota dolores. Malis suscipit accusamus his ne, utinam assentior prodesset ea eam, facer partem antiopam et cum.</p>
<p>Ex iisque eleifend periculis has. Sit aeterno virtute partiendo ei, eam nonumy bonorum adolescens ad. Ut nec suas vocent ornatus, cetero legendos <a href='javascript:;'>constituam mea ea</a>, pri cu delenit iracundia. Mundi decore nec te.</p>
<h1>Soleat civibus in pri</h1>
<p>In petentium erroribus percipitur per. Takimata accommodare ius ut, eam no postulant urbanitas. Qui ei tantas consectetuer, quis dictas euripidis duo ei. Quaeque democritum concludaturque has ne.</p>
<p>Blandit insolens constituto vix an. Has diam wisi in, eum unum repudiare no. Sit at virtute rationibus, qui vitae explicari cu. Vim ne singulis voluptatum, sed puto accusata salutandi ei. Ad mel civibus adversarium.</p>
<p>Per ne solum vivendo, fabulas dolorem vivendo in pro. Nec duis ignota cotidieque no, an per possit nostrum. Pro detraxit definitionem eu. Vivendo officiis no nam, eu has reque maiestatis percipitur, dolore reprimique accommodare cum ad. No utinam voluptua oportere pri, augue sonet dicant ei sea.</p>
<p>Sit et, an ius nihil apeirian. Eu posse tempor iuvaret cum. No diam dolor sea, postea mnesarchum ne ius, vel no utinam ignota dolores. Malis suscipit accusamus his ne, utinam assentior prodesset ea eam, facer partem antiopam et cum.</p>
</div>
</div>
</body>
</html>
How to reproduced: Please, create a div with a border and then "Columnizer" a children div. You will see how when singleColumnizeIt is executed, the text it's not inside of the bordered box.
If we get the parent of col here: https://github.com/adamwulf/Columnizer-jQuery-Plugin/blob/master/src/jquery.columnizer.js#L386
Then the text is inside the box... So, probably wrong box?
Also and less important, the padding of elements change when we execute singleColumnizeIt.
https://github.com/adamwulf/Columnizer-jQuery-Plugin/blob/master/src/jquery.columnizer.js#L373