Go
Not registered? Sign up!

How to position JW rotator into the center?

Google Translate
2 posts | return to the General Chat forum | get the rss feed for this thread

Oct. 28, 2009Lenny23

Thanks so much for providing JW Rotator, it works nicely and things look good. Only one question, probably asked already, I tried to position JW rotator into the center of the page by using <p align="center">. Somehow this seems to not work, the slideshow is displayed on the left of the page. How to get it to the middle, thanks for any help!
Lenny

Oct. 30, 2009Anders L

Here is how you can do it, Lenny.

Assign CSS style declaration to the head in the html markup. Supported by IE and Firefox.

<style type=text/css>
body {
margin: 0;
overflow: hidden;
background-color: #ce180b;
}
#bkg {
left: 0px;
width: 100%;
position: absolute;
top: 0px;
height: 100%;
}
#swfcontent {
left: 50%;
margin-left: -200px; // minus half the JW Rotator width
margin-top: -171px; // minus half the JW Rotator height
width: 400px; // JW Rotator width
border: 1px #f8d94d solid;
position: absolute;
top: 50%;
height: 342px; // JW Rotator height
}
</style>

Example webpage JW Player v 4.6.485 with YouTube playlist (read code)
http://www.linanders.com/YouTubeEaster.htm
Comment: The <center> tag, the center element and the align attribute are deprecated, but supported in all major browsers. However, it should be avoided! Deprecated in HTML 4.01, and is not supported in XHTML 1.0 Strict DTD. Use CSS instead.

Regards,
Anders

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.