Topic: Embeding SimpleView v2 in an aspx file

Hi, I'm new. I just downloaded and installed SimpleViewer and am trying to get the viewer to embed correctly in my aspx file (I'm using Visual Studio 2010, .net 4.5 I set up the SimpleViewer according to the instructions for embedding into an existing website listed here: … html#embed and from the set-up of it, it looks great. However, once it's embedded, it doesn't look so great. I am using a header in my master page file, but have inserted the code into the ContentPlaceHolder as is normal when using a masterpage in .net. Here is my .aspx file code:

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">    simpleviewer.ready(function () {
        simpleviewer.load("sv-container", "100%", "100%", "transparent", true);
<div id="sv-container"></div>


Here is what the page ends up looking like (Screen shot)

As you can (hopefully) see, the thumbnail images are hidden under the header and the slideshow image is small and not laid out next to the thumbnail images, as in the simpleviewer that is not embedded, where I originally created this viewer.

Any help on how to get the layout fixed would be greatly appreciated. I am presuming it is in the .css file where I need to fix it, but unfortunately I'm not familiar enough with .css to be able to know exactly which class in the .css file needs to be edited. Any help would truly be appreciated. Thanks!


Re: Embeding SimpleView v2 in an aspx file

The problem is likely to be with the height of your gallery.
When using a percentage height (such as 100%), you will need to ensure that the gallery's parent container has a height set via CSS. Otherwise, SimpleViewer will not be able to determine what its actual height should be. It needs to know what its height should be 100% of. Please see the note regarding using percentage heights in the embedding support section.

Try setting a fixed pixel height instead (such as 600px).

Also, it looks like your thumbnails are not actually hidden behind your web page's header. (The gallery's Button Bar is completely visible and this is at the top of the gallery.)
It looks like the thumbnails are truncated at the top of the gallery due to the height of the gallery not being large enough to accommodate the number of thumbnail rows you have chosen for your gallery. (The thumbnails are not dynamically scaled like the main image is.) Either increase the height of your gallery of reduce the value for the thumbRows configuration options.

If you continue to experience difficulties, please post the URL to your web page so that I can take a look at the code on your web page and help further.

Steven Speirs
SimpleViewer Support Team.

Re: Embeding SimpleView v2 in an aspx file

Thank you VERY much for that. I did see that information in the embed documentation, but I honestly didn't know exactly why it was doing that. I will try your suggestion and let you know if it works! Thanks again!