Image as background tag in Image Slider
Permalink<li class="centroslider" style="background: url(EACH IMAGE HERE);> <?php if ($row['linkURL']) { ?> <a href="<?php echo $row['linkURL']; ?>" class="mega-link-overlay"></a> <?php } ?> IMAGE TO BE REMOVED FROM HERE <?php $f = File::getByID($row['fID']); ?> <?php if (is_object($f)) { $tag = Core::make('html/image', [$f, false])->getTag(); if ($row['title']) { $tag->alt($row['title']); } else { $tag->alt("slide");
I can then set the background-images as centred and cover in CSS and the overall height of the image slider is not dependent on height of images in responsive layouts.
An example of this:http://www.parallaxdesign.com.au...
Have already implemented on site :http://www.coton.com.au. Thanks
But in this code, the image is used as background and the original image tag is removed so most likely your slide will collide as the image tag was giving it its height. So you need to find a way to give your slide a height.