You're either looking for AJAX or PHP's include function. If you don't mind the page reloading, then go with PHP's include function. But if you do, then AJAX is what you want.
thanks for that.. ive tried it out and yeah it works..
now the problem is .. what if the external link had css attached to it.. cause i wanted the gallery page to load onto the div layer, now it loads but the lighbox doesnt work. do i have to attach something or do something to it?
Well we would need to see how you have the pages set up before we know how to fix the problem, so if you can load a demo page to your account or post the code to the gallery page to take a look and see what it looks like.
Just remember although your loading an external page that page needs to have the proper coding, and so make sure your gallery page has this in your header
and of course have this connected to your pics as well
rel="lightbox"
If you need more help I know lightbox pretty well, and enough ajax and php to fix the problem, but before that just post a demo or the code your working with and we can fix it right up.
Also let us know what method your using since you didn't mention in the post which way you went.
Edited by Saint_Michael, 14 December 2007 - 03:40 AM.
I know the problem here .. the external pages you are loading even though it has CSS styles attached to it dont render all properly when its fetched from outside the parent document.
THe only way I've found out a fix is to have the javascripts and CSS on the parent document then when the ajaxed document is pulled in it should work.
If you need more help I know lightbox pretty well, and enough ajax and php to fix the problem, but before that just post a demo or the code your working with and we can fix it right up.
Also let us know what method your using since you didn't mention in the post which way you went.
I think the background showing is because of a default margin effect on image tags <img> you can try set margins for all images to zero. I think that should fix it.
so try adding this line into your css file.
img {
margin: 0px;
}
This should set margins to all image tags to 0 value.
it didnt work. it jst moved my image all the way to the top of the div... is there a specific are where im suppose to paste that code. or it doesnt matter as long as its in my css file?
it shouldnt matter where it is but if there is 2 img styles the bottom one should over write I think. your css file dosent have it though i checked. I know the problem has to be margins because thats the only thing it looks like. you could try
* {
margin 0px;
}
it might work. I should really try and copy the page/site over to try out myself
[hr=noshade] [/hr]
oh I think I see it now. it looks like you have a <p> tag around the image thats whats probably causing the margins.
you could do
p {
margin: 0px;
}
edit: Dont do the previous suggestion of * { margin: 0px} its crazy it will apply 0 margins to everything. You probably only want to apply 0 margins to things you want to have zero margins not everything.