Я пытаюсь добавить слайд-шоу на один из моих сайтов. Вся страница выложена в HTML-таблицу (которую я страстно ненавижу и не выбрал). Я хочу сосредоточить свое слайд-шоу внутри этой патикульной колонны. Вот как выглядит мой CSS:
#slideshow {
position:relative;
}
#slideshow IMG {
position:absolute;
z-index:8;
opacity:0.0;
}
#slideshow IMG.active {
z-index:10;
opacity:1.0;
}
#slideshow IMG.last-active {
z-index:9;
}
Вот моя функция JQuery для изменения изображений:
function slideSwitch() {
var $active = $('#slideshow IMG.active');
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
// use this to pull the images in the order they appear in the markup
var $next = $active.next().length ? $active.next()
: $('#slideshow IMG:first');
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}
$(function() {
setInterval( "slideSwitch()", 5000 );
});
И, наконец, вот слайд-шоу внутри таблицы:
<td bgcolor="red" align="center" valign="top">
<div id="slideshow">
<img src="2009Slideshow\1.jpg" alt="Slideshow Image 1" class="active" />
<img src="2009Slideshow\2.jpg" alt="Slideshow Image 2" />
<img src="2009Slideshow\3.jpg" alt="Slideshow Image 3" />
etc...
etc...
</div>
</td>
Так почему я не могу поместить свое слайд-шоу в центр этой колонки?