PDA

View Full Version : Resolved Trouble positioning background of image slider



kyllle
Jan 19th, 2010, 05:07 PM
Hi all,

Iv personalised an image slider and would like to add a mac image as the background positioning each slide in the monitor of the mac, my problem is though that for come reason I just cant get the monitor background to display at all never mind position it, I dunno if its just been a long day and Im being silly or if Im just doin somethin wrong, Iv tried wrapping a div around the slider and adding the background that way, Iv also added the background to the #slider id but no joy, could someone give me some advice please?

Page is here http://www.kylehouston.com/new/01.html

Thanks in advance!

Kyle

Excavator
Jan 19th, 2010, 05:17 PM
Hello kylle,
There doesn't appear to be any image at http://www.kylehouston.com/new/images/mac.png

kyllle
Jan 19th, 2010, 05:24 PM
Hi Ex,

Iv added the mac as an image as sometimes the host i use doesnt allow you to view the image using the path, its a free host.

I hope this can help

Thanks for looking

Excavator
Jan 19th, 2010, 05:42 PM
Try something like this. I didn't have the js, or the image because that is just a weird thing your free host is doing, so I just guessed at the placement but you'll be able to see how it's done -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/easySlider1.7.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#slider").easySlider({
auto: true,
continuous: true
});
});
</script>
<style type="text/css">
html, body {
background: #FC6;
}
#container {
height: 219px;
width: 800px;
margin: 30px auto;
position: relative;
background: #999 url(http://www.kylehouston.com/new/images/mac.png) no-repeat left top;
}
#slider{
width: 251px;
height: 158px;
background: #00f; /*for demonstration only*/
position: absolute;
left: 25px; /*adjust positioning here*/
top: 25px; /*adjust positioning here*/
}
#slider ul, #slider li{
margin: 0;
padding: 0;
list-style: none;
}
#slider li{
width: 251px;
height: 158px;
overflow: hidden;
}
</style>
</head>
<body>
<div id="container">
<div id="slider">
<ul>
<li><a href=""><img src="images/img1.jpg" width="251px" height="158px" alt="" /></a></li>
<li><a href=""><img src="images/img2.jpg" width="251px" height="158px" alt="" /></a></li>
<li><a href=""><img src="images/img3.jpg" width="251px" height="158px" alt="" /></a></li>
<li><a href=""><img src="images/img4.jpg" width="251px" height="158px" alt="" /></a></li>
<li><a href=""><img src="images/img5.jpg" width="251px" height="158px" alt="" /></a></li>
<li><a href=""><img src="images/img6.jpg" width="251px" height="158px" alt="" /></a></li>
</ul>
</div>
<!--end container--></div>
</body>
</html>

kyllle
Jan 19th, 2010, 05:48 PM
Thanks for this Ex, i knew I had left out something!!