I'm setting up the responsive _NivoSlider_ on my website and would like to display each image using their original sizes, rather than filling the entire wrapper/container.
Currently, my site looks something like this:
But, if toystory.jpg is 618 x 246px for example, I would like it to only stretch to that size while keeping its responsiveness when scaling down the browser, looking something like this:
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<html lang="en">
<head>
<title>Nivo Slider Demo</title>
<link rel="stylesheet" href="../themes/default/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../themes/light/light.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../themes/dark/dark.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../themes/bar/bar.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
<a href="http://dev7studios.com" id="dev7link" title="Go to dev7studios">dev7studios</a>
<div class="slider-wrapper theme-default">
<div id="slider" class="nivoSlider">
<img src="images/toystory.jpg" data-thumb="images/toystory.jpg" alt="" />
<a href="http://dev7studios.com"><img src="images/up.jpg" data-thumb="images/up.jpg" alt="" title="This is an example of a caption" /></a>
<img src="images/walle.jpg" data-thumb="images/walle.jpg" alt="" data-transition="slideInLeft" />
<img src="images/nemo.jpg" data-thumb="images/nemo.jpg" alt="" title="#htmlcaption" />
</div>
<div id="htmlcaption" class="nivo-html-caption">
<strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
</div>
</div>
</div>
<script type="text/javascript" src="scripts/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="../jquery.nivo.slider.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
</body>
</html>
How would I be able to achieve this, without possibly setting the width and height individually on each image with inline styling, or having the wrapper/container being the element that sizes all my images?
I'm setting up the responsive _NivoSlider_ on my website and would like to display each image using their original sizes, rather than filling the entire wrapper/container.
Currently, my site looks something like this:
But, if toystory.jpg is 618 x 246px for example, I would like it to only stretch to that size while keeping its responsiveness when scaling down the browser, looking something like this:
HTML:
CSS:
How would I be able to achieve this, without possibly setting the width and height individually on each image with inline styling, or having the wrapper/container being the element that sizes all my images?