473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Display Image-Borders only if...

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
7 2842

"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
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
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
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
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tyrone Slothrop | last post by:
I am coding a site which involves uploading images. All of the PHP and display is OK but the client wants to be able to display the image thumbnail on the upload page and show the full image on...
4
by: Kevin Myers | last post by:
Hello, Please forgive my reposting of this note with hopefully a more relevant subject line. On an Access 2000 form under Windows 2000 I would like to use a Kodak Image Edit Control to...
5
by: Peter Lapic | last post by:
I have to create a image web service that when it receives an imageid parameter it will return a gif image from a file that has been stored on the server. The client will be an asp.net web page...
4
by: DoomedLung | last post by:
I have been developing an image gallery which needed to be dynamic as possible. so I have placed the gallery in a div plus a div containing the large image to be displayed. It works by changing...
3
by: DoomedLung | last post by:
I have been developing an image gallery which needed to be dynamic as possible. so I have placed the gallery in a div plus a div containing the large image to be displayed. It works by changing...
3
by: den 2005 | last post by:
Hi everyone, Here is code working on..Trying to insert record with a column with Image or VarBinary datatype in sql database from a existing jpeg image file, then retrieve this image from...
3
by: c676228 | last post by:
Hi everyone, I have a piece of code in sales.aspx.vb like this: Protected WithEvents Message As System.Web.UI.WebControls.Label Try ... ChartImage.ImageUrl = "ChartGenerator.aspx?" + DataStr +...
0
by: adubra | last post by:
Hi there, I am using a device context (DC) and a buffer to successfully draw to screen. However, when I update the DC at very high frame rate and drag the frame containing the image very quickly...
1
by: nanaalwi | last post by:
Hi, Currently I'm developing a software using VB.net that can grab an image using Matrox Morphis card and display it in a PictureBox. The software can grab the image already and display it in the...
1
by: amritranjan | last post by:
How to retrive image file from MS access database and display this in another JSPpage -------------------------------------------------------------------------------- This is my Jsp code for...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.