-
tweaking the featured content slider v2.0
1) Script Title: featured content slider
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tentslider.htm
3) Describe problem:
1. i can't get the images to show up as i am referencing them through code so they're not hard coded into the div statement
2. if i leave the .css file as is, only the pagination shows up. if i delete the .slider (position: relative
, i can see text content but the box is double the length.
here's the code i have for problem 1:
- i have the image sources in html set to
<img src="" id="img1">
in my 1.1 code i'm trying to reference the src so i have:
dim img1 as image
img1=new image
value = placeholder.src
img1=value
value is giving me the correct url, but it won't display the image?
problem 2: this is the updated version i have of contentslider.css:
.sliderwrapper{
/*position: relative; /*leave as is*/
overflow: hidden; /*leave as is*/
border: 1px solid black;
border-bottom-width: 1px;
width: 400px; /*width of featured content slider*/
height: 294px; /*started @ 250*/
}
.sliderwrapper .contentdiv{
visibility: hidden; /*leave as is*/
position:absolute; /*leave as is*/
left: 0; /*leave as is*/
top: 0; /*leave as is*/
padding: 5px;
background: blue;
font-weight:bold; /* take out when done kiva:6/3/08*/
width: 390px; /*width of content DIVs within slider. Total width should equal slider's inner width (390+5+5=400) */
height: 100%;
filter
rogid
XImageTransform.Microsoft.alpha(opacity=100);
/*-moz-opacity: 1;
opacity: 1;*/
}
.pagination{
width: 382px; /*Width of pagination DIV. Total width should equal slider's outer width (400+10+10=420)*/
text-align: center;
background-color: navy;
padding: 2px 10px;
color: white;
font-weight:bold;
}
.pagination a{
padding: 0 5px;
text-decoration: none;
color: #00007D;
background: white;
}
.pagination a:hover, .pagination a.selected{
color: #000;
background-color: #FEE496;
}
any help is greatly appreciated
-
-
Please post a link to the page on your site that contains the problematic script so we can check it out.
-
-
-
-
It may be the exact script, but what else is on your page may be the culprit, hence we need to see a URL to the problem page.
-
-
Problem 1 is simply that you never set the src of the img. Ex.
document['img1'].src = "./happymonkey.jpg"
Problem 2...there are an infinite number of things that could be wrong. Without seeing the site, there's no way anyone could answer :S
Verzeihung!
-
-
sorry for the late response & thank you for responding . . .
ok, i've figured out problem 1. i had to add an <asp:image webcontrol for it to work. i didn't use your approach because i couldn't hardcode the image in HTML, i needed to add it in .net code. so here's what i used:
in my html code i have:
<div id="slider1" class="sliderwrapper">
<div id="Image1" class="contentdiv"><div>
<asp:Image id="img1" runat="server"></asp:Image>
<asp:Label ID="lbl1" Runat="server"></asp:Label><br>
</div>
</div>
in my code behind for this page i have:
img1.imageurl = "page1.url" *page1 is whereever my source is*
Problem 2: i had to change some of the settings in the css file around & now its ok
Another thing i'd like to have is the ability to start the slide show back up after you've selected a page (maybe a play button). i've seen something here for it, but it was for the old contentslider version. i'll attach the link to my page here in a minute! thx again.
-
-
actually guys, i think i'm going to close this thread & open a new one up for the play button. thank you for your help on this one.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks