1 (edited by Bruce Schmidt 2012-10-08 17:57:06)

Topic: Centering?

So I'm trying to center my tilt viewer in on the website page, Width wise only. I want it to stay in the center when I shrink the window down but it always goes off screen to the right. everything else on my page stays centered. anyone know how to fix this?

Re: Centering?

You can horizontally center a <div> by using the CSS rule:

margin: 0 auto;

Therefore, you can horizontally center your gallery (which, by default, is embedded in the #flashcontent <div>) by using the following code:

#flashcontent {
    height: 100%;
    width: 600px;
    margin: 0 auto;
}

The width in the above code is just an example and you can change this value to whatever you like. (If I left it at the default value of '100%' you would not see the centering effect as it would span the entire browser window width.)

Steven Speirs
SimpleViewer Support Team

Re: Centering?

I tried it but it still goes right. all it did was change the portions of my flash viewing area.

Re: Centering?

Thanks but never mind. It was a problem with my body css. I had a min height which prevent it from moving over.

Re: Centering?

I am glad you have found a solution to your problem.
Thank you for posting back to let me know.

Steven Speirs
SimpleViewer Support Team