By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Display Image-Borders only if...

P: n/a
I created Search.CSS which grabs Google results (using the Web API),
displays as XHTML1.0 Strict + CSS, and recently also adds Thumbnails.
<http://blog.outer-court.com/search-c...&css=blog.oute
r-court.com%2Fsearch-css%2Fdefault.css>

My question, how can I display image-borders only if the image is
bigger than 1x1 pixels? Because that's the default served by the Open
Thumbs project. So if I display a border around all images via CSS,
then I also get the border around non-existing (1x1) images... which I
don't want...

I know it's not really possible and all but maybe with some workaround?
Should work in at least IExplorer 6...
Thanks!
Jul 20 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a

"Philipp Lenssen" <in**@outer-court.com> wrote in message
news:bt************@ID-203055.news.uni-berlin.de...
I created Search.CSS which grabs Google results (using the Web API), displays as XHTML1.0 Strict + CSS, and recently also adds Thumbnails. <http://blog.outer-court.com/search-c...=google&css=bl
og.oute r-court.com%2Fsearch-css%2Fdefault.css>

My question, how can I display image-borders only if the image is bigger than 1x1 pixels? Because that's the default served by the Open Thumbs project. So if I display a border around all images via CSS, then I also get the border around non-existing (1x1) images... which I don't want...

I know it's not really possible and all but maybe with some workaround? Should work in at least IExplorer 6...
Thanks!


Let's see if I understand the problem. You're served images for
search results. Some are actual images, some are just blank
pixels. You want to style the borders off if it's just the pixel,
and not a "real" image?
Jul 20 '05 #2

P: n/a
Philipp Lenssen wrote:
I created Search.CSS which grabs Google results (using the Web
API), displays as XHTML1.0 Strict + CSS, and recently also adds
Thumbnails.

how can I display image-borders only if the image is bigger than
1x1 pixels?
Are the images sizes included in the html?
Should work in at least IExplorer 6...


That's probably a non-starter. But it might be possible in Mozilla
and Opera.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #3

P: n/a
Neal wrote:

Let's see if I understand the problem. You're served images for
search results. Some are actual images, some are just blank
pixels. You want to style the borders off if it's just the pixel,
and not a "real" image?


Exactly. I don't know before-hand which size the image is. And if it's
1x1 pixels, I better hide it. (Background: I'm using Thumbshots.)
Jul 20 '05 #4

P: n/a
Brian wrote:
Philipp Lenssen wrote:
I created Search.CSS which grabs Google results (using the Web
API), displays as XHTML1.0 Strict + CSS, and recently also adds
Thumbnails.

how can I display image-borders only if the image is bigger than
1x1 pixels?


Are the images sizes included in the html?


No... that's part of the problem... the other is that it has to work in
IExplorer.
Jul 20 '05 #5

P: n/a
"Philipp Lenssen" <in**@outer-court.com> wrote in message news:<bt************@ID-203055.news.uni-berlin.de>...
I created Search.CSS which grabs Google results (using the Web API),
displays as XHTML1.0 Strict + CSS, and recently also adds Thumbnails.
<http://blog.outer-court.com/search-c...&css=blog.oute
r-court.com%2Fsearch-css%2Fdefault.css>

My question, how can I display image-borders only if the image is
bigger than 1x1 pixels? Because that's the default served by the Open
Thumbs project. So if I display a border around all images via CSS,
then I also get the border around non-existing (1x1) images... which I
don't want...

I know it's not really possible and all but maybe with some workaround?
Should work in at least IExplorer 6...
Thanks!


First at all... sorry for my english... it's very bad :)
I think you should use a javascript to do that (to read the pic's
dimension and apply border or not ).
Jul 20 '05 #6

P: n/a
dIna wrote:
"Philipp Lenssen" <in**@outer-court.com> wrote in message
news:<bt************@ID-203055.news.uni-berlin.de>...

My question, how can I display image-borders only if the image is
bigger than 1x1 pixels? Because that's the default served by the
Open Thumbs project. So if I display a border around all images via
CSS, then I also get the border around non-existing (1x1) images...
which I don't want...

I think you should use a javascript to do that (to read the pic's
dimension and apply border or not ).


Yes you're right... I was wondering how to do it within the stylesheet
without the use of JavaScript.
Jul 20 '05 #7

P: n/a
Hello,

"Philipp Lenssen" <in**@outer-court.com> schrieb im Newsbeitrag
news:bt************@ID-203055.news.uni-berlin.de...
dIna wrote:
"Philipp Lenssen" <in**@outer-court.com> wrote in message
news:<bt************@ID-203055.news.uni-berlin.de>...


My question, how can I display image-borders only if the image is
bigger than 1x1 pixels? Because that's the default served by the
Open Thumbs project. So if I display a border around all images via
CSS, then I also get the border around non-existing (1x1) images...
which I don't want...

I think you should use a javascript to do that (to read the pic's
dimension and apply border or not ).


Yes you're right... I was wondering how to do it within the stylesheet
without the use of JavaScript.


Make use of graphic library.
Using php, check if your provider installed it (phpinfo()).
I guess, they provide it.
Using this library, create an instance with each picture and get picture
dimensions by appropiate methods.
Then generate two different xhtml outputs (serverside) dependant on size
with different css-classes.
Let CSS decide what to do with them.
In addition you might wish not to generate link tag around "empty" image.
Further you might to wish not to generate any xhtml with empty pictures.

have luck,
--
Marko Faldix
M+R Infosysteme
Hubert-Wienen-Str. 24 52070 Aachen
Tel.: 0241-93878-16 Fax.:0241-875095

Jul 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.