Iframe image border removal

swifter_uk

Joined: 2011-12-05
Posts: 14
Posted: Mon, 2011-12-05 14:08

I hope this is the correct forum to post in?
I have searched the forums for similar problems but none of the fixes mentioned seem to work in my case. Using Gallery 2.3.1

I have an Iframe calling a random image from a gallery page. Example here, random image is in right hand sidebar. http://retiredgreyhounds.info/site_new/default.html

Image is called into the Iframe via a php script

<?php @readfile('http://hovedogs.co.uk/gallery/gallery2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title&g2_linkTarget=_top&g2_link=http://retiredgreyhounds.info/site_new/gallery/available.html'); ?>

This is designed to open the gallery to view the specific album which works fine.
The only issue I have is that within IE8 and probably other versions the images in the Iframe are rendered with a hyperlink border that I want to get rid of. It does not seem to be the case when viewing in other browsers such as Safari, Opera or Mozilla. Has anyone any ideas please why this is happening.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2011-12-05 14:29

On this page:
http://retiredgreyhounds.info/site_new/imageblock.php

Set the image border to 0

http://www.w3schools.com/tags/att_img_border.asp

Or use CSS, but either way, that's what is happening.
____________________________________________
Like Gallery? Like the support? Donate now!

 
swifter_uk

Joined: 2011-12-05
Posts: 14
Posted: Mon, 2011-12-05 15:53

Thanks for the reply!

Have tried CSS method but to no avail. I did think about adding to imageblock but my efforts so far have only produced errors. This is the code in imageblock.php

Quote:
<?php @readfile('http://hovedogs.co.uk/gallery/gallery2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title&g2_linkTarget=_top&g2_link=http://retiredgreyhounds.info/site_new/gallery/available.html'); ?>

Any idea how to set the image border to none or zero in that?

 
swifter_uk

Joined: 2011-12-05
Posts: 14
Posted: Fri, 2011-12-09 13:58

Sorry to bump....but I have managed to get nowhere with this so far, I have tried adding style="border:none" to the Iframe code itself but it mad no difference, so annoying

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Fri, 2011-12-09 14:05

Look at the source of:
http://retiredgreyhounds.info/site_new/imageblock.php

There is no CSS being specified in that page. Since this is in an iframe, it's not going to use any of the css on the parent page that's calling the iframe. Get it working on that page and you should be gold.
____________________________________________
Like Gallery? Like the support? Donate now!

 
swifter_uk

Joined: 2011-12-05
Posts: 14
Posted: Fri, 2011-12-09 14:27

Thanks, but I did try adding style="border:none" also to the imageblock.php code..like so:

Quote:
<?php @readfile('http://hovedogs.co.uk/gallery/gallery2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title&g2_linkTarget=_top&g2_link=http://retiredgreyhounds.info/site_new/gallery/available.html style="border:none"'); ?>

Still it made no difference, not sure how else to add it in?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Fri, 2011-12-09 14:35

I'm thinking something more like:

<html>
<head>
<style type="text/css">
.giThumbnail {border: none;}
</style>
</head>
<body><?php @readfile('http://hovedogs.co.uk/gallery/gallery2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title&g2_linkTarget=_top&g2_link=http://retiredgreyhounds.info/site_new/gallery/available.html ?>
</body>
</html>
____________________________________________
Like Gallery? Like the support? Donate now!

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Fri, 2011-12-09 14:36

Or you can go and edit the code in G2 to change output or you could pull in the css file from your theme.
____________________________________________
Like Gallery? Like the support? Donate now!

 
swifter_uk

Joined: 2011-12-05
Posts: 14
Posted: Fri, 2011-12-09 14:38

Oh God....I got it!

Quote:
<?php @readfile('http://hovedogs.co.uk/gallery/gallery2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title&g2_linkTarget=_top&g2_link=http://retiredgreyhounds.info/site_new/gallery/available.html style="border:none"'); ?>

<style>
.giThumbnail {
border: none;
}</style>

 
swifter_uk

Joined: 2011-12-05
Posts: 14
Posted: Fri, 2011-12-09 14:41

Thanks again nivekiam, you got me thinking about .githumbnail again I tried that in the theme.css but obviously did not work, now it is working a treat..

Your code looks a bit better I'll try that too...many many thanks!!!!

 
swifter_uk

Joined: 2011-12-05
Posts: 14
Posted: Fri, 2011-12-09 14:57
nivekiam wrote:
I'm thinking something more like:

<html>
<head>
<style type="text/css">
.giThumbnail {border: none;}
</style>
</head>
<body><?php @readfile('http://hovedogs.co.uk/gallery/gallery2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title&g2_linkTarget=_top&g2_link=http://retiredgreyhounds.info/site_new/gallery/available.html ?>
</body>
</html>

Yep, that worked too...when I added '); ?> back on the end of it ;-}
____________________________________________
Like Gallery? Like the support? Donate now!