Topic: spacing above gallery in wordpress

The simpleviewer gallery on this wordpress page has over an inch of space above it that I can't seem to eliminate using the suggested embedding methods:  http://www.borderlandsbestgear.com/

What might I try next?

Here's my code:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript">
var svCoreURL="http://borderlandsbestgear.com/svmanager/g2/svcore/";
</script>
<script type="text/javascript" src="http://borderlandsbestgear.com/svmanager/g2/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
flashvars.baseURL="http://borderlandsbestgear.com/svmanager/g2/";
jQuery(document).ready(function () {
SV.simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="parent" style="height: 430px;">
<div id="parent" style="width: 900px;">
<div id="sv-container"></div></div></div>
<!-- END SIMPLEVIEWER EMBED -->

Re: spacing above gallery in wordpress

Your page has 4 line breaks (<br />) between the end of the text and the beginning of the nested <div>s containing the gallery. If these line breaks are removed, there will be less space above the gallery.
It looks like these line breaks are being inserted automatically within WordPress somehow. Try temporarily disabling all plugins other than WP-SimpleViewer to see if a plugin you have installed is changing the embedding code you are entering.

Steven Speirs
SimpleViewer Support Team.

Re: spacing above gallery in wordpress

Thanks for the reply, Steven.  I'm not using WP-Simpleviewer, should I?  I just disabled ALL the plugins - no exceptions - and it looks like the spacing is the same.  Fwiw it happens with all of the several themes I've tried as well.  There's nothing I'm putting between the text and the code either :shrug:

Just put the mouse over a thumbnail to see the full size guncard (which you can click on to go to the gun's gearcalc page for lots more info (e.g. parts makeup, damage per second, reload speed etc).  <strong>The thumbnails can also be navigated with the arrow keys on your keyboard - just  make sure to click on one of them with your mouse first.</strong>
<center><!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript">
var svCoreURL="http://borderlandsbestgear.com/svmanager/g2/svcore/";
</script>
<script type="text/javascript" src="http://borderlandsbestgear.com/svmanager/g2/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
flashvars.baseURL="http://borderlandsbestgear.com/svmanager/g2/";
jQuery(document).ready(function () {
SV.simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="parent" style="height: 500px;">
<div id="parent" style="width: 990px;">
<div id="sv-container"></div></div></div>
<!-- END SIMPLEVIEWER EMBED --></center>

Last edited by brasmasus (2011-10-25 21:40:45)

Re: spacing above gallery in wordpress

I'm not using WP-Simpleviewer, should I?

You could certainly try it if you like but embedding a SimpleViewer gallery using the baseURL method (as you are currently trying) should work fine.
Make sure that your WordPress installation is up-to-date (v3.2.1) and that when you enter your embedding code into the body of the post, the method of entry is 'HTML' rather than 'Visual'.
Also, your embedding code is slightly outdated (the 'svCoreURL' variable is no longer required) and can be replaced with the following:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http://borderlandsbestgear.com/svmanager/g2/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
flashvars.baseURL="http://borderlandsbestgear.com/svmanager/g2/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "990", "500", "222222", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

You could also try the <iframe> method of embedding as described here: http://simpleviewer.net/simpleviewer/su … l#external
Only one line of code is required to embed a gallery so there is less opportunity for whatever is adding the line breaks to add them.

Steven Speirs
SimpleViewer Support Team.

Re: spacing above gallery in wordpress

your updated code got rid of one of the line breaks so that's progress!

I'll try the iframe method when I get a chance

EDIT: iframe method works freakin perfect.

Last edited by brasmasus (2011-10-25 22:21:09)