Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

How to position JW rotator into the center?

1 reply [Last post]

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

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