I have a gallery that I got from Code Canyon which works well. But when inserting it into another div layer it stops working. I see the javascript code in the header points to .container, but since its also inside another div not sure if something needs to be changed. Could I get some help on this small issue? thanks.
With things like this, I find that you need to install the code as received, and then make minor adjustments and test at each stage. Then if something goes wrong, you know where the trouble started. There are some styles in there hiding the content, but that doesn’t seem to be the whole story.
Yea I am going back through now and trying to test things one by one to narrow it down. Having no luck yet though. The test page that came with the gallery, when I edit it and put the gallery into another div it works fine. So it’s only when I’m putting it into my new page…
All the same, you are calling on a class that doesn’t exist, so might as well make it an id.
You also call on the jQuery library twice, which is a mistake. Not sure if that messes anything up, but at least remove the second link to the library. It could cause problems to call it again—especially after you’ve cited it already. If nothing else, it’s twice as much code to download.
I changed it to a class. But I also changed the js just now back to .container because thats how it came when I downloaded it. Also where am I calling on the jquery library twice? Can’t seem to find that…
Oh ok I see that now. So I can use the latest one and they both would work? I was under the impression you needed to use the library that the script was written for. I have another slideshow as you can see in the third grey box. That’s what the other one is for. So just delete it and use one?
Generally yes, it should be fine to update to the latest script. Normally it’s backward compatible—at least in my experience, although I’ve seen a minor break once.
Great, glad it’s on the way. Not sure if you’ve come to this yet, but the social buttons on the right are a bit messed up at this stage. See screen shot.
On a Mac, and it’s the same in all browsers. It was like that before—just didn’t want to distract you. I’d prefer a CSS solution, but an easy fix is to add a <br>:
GET SOCIAL UPDATES FROM SIA[COLOR="Red"]<br>[/COLOR]
<img height="32" width="32" alt="Southern Insurance Agency Facebook" src="http://www.sitepoint.com/forums/images/social/facebook_32.png">
<img height="32" width="32" alt="Southern Insurance Agency Twitter" src="http://www.sitepoint.com/forums/images/social/twitter_32.png">
<img height="32" width="32" alt="Southern Insurance Agency LinkedIn" src="http://www.sitepoint.com/forums/images/social/linkedin_32.png">
EDIT: sorry, not true: not all browsers, but I first noticed in in Firefox.
I was going to use that temp. What would be a proper css way to do that? If you don’t mind when you have a chance could you show me? <br> will work for now. But it’s weird I don’t see that on a PC in any browser, IE, Firefox, Chrome…
Browsers each render text a bit differently, so you can’t rely on with width of the text to push those images down. I guess there’s nothing really wrong with the <br>. I prefer not to have raw text in a div, though. I normally use a <p>, but others disagree with that. One thing you could do instead is just reduce the width of the div a bit (and maybe adjust its position a little also to make up for it not being 100% wide.