Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

problem while creating a slider using jquery nivo slider

Featured Replies

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="slider.css" type="text/css" media="screen" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script src="jquery.nivo.slider.pack.js" type="text/javascript"></script>


<script type="text/javascript">
$(window).load(function() {
   $('#slider').nivoSlider()

});
</script>
</head>

<body>
<div id="wrapper">

<div id="slider">
   <img src="images/slide1.jpg" alt="motherwell school of motoring" />
   <img src="images/slide2.jpg" alt="driving lessons motherwell" />
   <img src="images/slide3.jpg" alt="motherwell school of motoring car" />
   <img src="images/slide4.jpg" alt="motherwell driving lessons" />
</div>






</div>

</body>
</html>

 

@charset "utf-8";
/* CSS Document */
#slider {
   position:relative;
   width:960px; /* Change this to your images width */
   height:250px; /* Change this to your images height */
   background:url(images/loading.gif) no-repeat 50% 50%;
}
#slider img {
   position:absolute;
   top:0px;
   left:0px;
   display:none;
width:940px; /* Change this to your images width */
   height:250px; /* Change this to your images height */
}
#slider a {
   border:0;
   display:block;
}

#wrapper {
width: 960px;
}

 

so the slider is working but for some strange reason down the left hand side of the page its seems to be showing the image going down the way

ive attached image to show use what i mean and ive included my code and css

post-16705-0-14265300-1302723600_thumb.jpg

Make sure #slider and #slider img have the same width.

Also try adding:

overflow: hidden;

for #slider

Don't do anything suggested above!

 

It's not working because you've not included the CSS that came with Nivo Slider. If you want it working properly, upload the original CSS file.

 

It's a complex plugin and trying to write your own CSS from scratch for it will be a complete nightmare and it doesn't look like you've got the technical ability to do it (not trying to be offensive, just honest). You'd be far better off customising the original CSS - it will be a lot easier and take a lot less time.

  • Author

ive not wrote my own css the css file im using is the one that came with it, also im very up to date and no how to use both html and css very well so no offence taken, ive just seen sliders being used on other sites n thought they looked good hence why i wanted to try to get one working

ive not wrote my own css the css file im using is the one that came with it, also im very up to date and no how to use both html and css very well so no offence taken, ive just seen sliders being used on other sites n thought they looked good hence why i wanted to try to get one working

 

Fair enough. I'm sorry for making that assumption then.

 

I still can't see the nivo-slider.css file on your site though. I've attached a copy for you, if you upload it or just past the contents into your slider.css then the slider should work properly.

nivo-slider.css

Can't see the slider:

 

Website Under Review

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.