Note that there are some explanatory texts on larger screens.

plurals
  1. POvertical/horizontal centered fluid slideshow
    primarykey
    data
    text
    <p>I try to make a vertical/horizontal centered fluid slideshow, but it seems so, that the slideshow is not vertically centered in Internet Explorer 7 and there are some issues with Internet Explorer 9 and 10. Maybe someone can help me to improve my code. There are also some pixel differences in the top and bottom margin of the vertical center.</p> <p>Thanks</p> <p>Working example: <a href="http://goo.gl/DesJo" rel="nofollow">http://goo.gl/DesJo</a></p> <p>Used: <a href="http://responsive-slides.viljamis.com" rel="nofollow">ResponsiveSlides</a></p> <p>PS: Is there a way to preload all images?</p> <p>HTML:</p> <pre><code>&lt;div id="content"&gt; &lt;article class="layer"&gt; &lt;div class="wrap"&gt; &lt;ul class="rslides"&gt; &lt;li&gt;&lt;img src="01.jpg" alt=""&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="02.jpg" alt=""&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="03.jpg" alt=""&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="04.jpg" alt=""&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="05.jpg" alt=""&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="06.jpg" alt=""&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="07.jpg" alt=""&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="08.jpg" alt=""&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="09.jpg" alt=""&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/article&gt; &lt;article class="layer"&gt;&lt;/article&gt; &lt;/div&gt; </code></pre> <p>JavaScript:</p> <pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="js/resize.js"&gt;&lt;/script&gt; &lt;script src="js/responsiveslides.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(function() { $(".rslides").responsiveSlides({ fx: 'fade', speed: 0, timeout: 3000, random: true }); }); &lt;/script&gt; </code></pre> <p>resize.js</p> <pre><code>/*window.onresize = function(){ $('article.layer img').css({ maxHeight: $('article.layer').height() * 0.8, maxWidth: $('article.layer').width() * 0.8 }); };*/ $(window).resize(function(){ $('article.layer img').css({ maxHeight: $('article.layer').height() * 0.8, maxWidth: $('article.layer').width() * 0.8 }); }); </code></pre> <p>CSS (wihtout CSSreset and menu)</p> <pre><code>body { font-family: 'theantiquab_w5_plainregular'; color: #000; } a { text-decoration: none; color: #000; } a:hover { color: #e84a36; } @font-face { font-family: 'theantiquab_w5_plainregular'; src: url('theantiqua-webfont.eot'); src: url('theantiqua-webfont.eot?#iefix') format('embedded-opentype'), url('theantiqua-webfont.woff') format('woff'), url('theantiqua-webfont.ttf') format('truetype'), url('theantiqua-webfont.svg#theantiquab_w5_plainregular') format('svg'); font-weight: normal; font-style: normal; } article, aside, figure, footer, header, hgroup, menu, nav, section { display: block; } html, body, #content { margin: 0; padding: 0; height: 100%; width: 100%; overflow: hidden; } article.layer { position: relative; display: table; height: 100%; width: 100%; } div.wrap { display: table-cell; vertical-align: middle; text-align: center; } article.layer img { max-width: 80%; max-height: 80%; } /* http://responsive-slides.viljamis.com */ .rslides { display: inline-block; position: relative; list-style: none; overflow: hidden; width: 100%; padding: 0; margin: 0; } .rslides li { position: absolute; display: none; width: 100%; left: 0; top: 0; } .rslides li:first-child { position: relative; float: left; } .rslides img { height: auto; border: 0; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload