469,648 Members | 1,186 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

dynamic images problem...

I'm building a site that requires images to be placed into a table
dynamically - the name of each image is drawn from a database reference.
(e.g database entry is "images/image1.jpg" etc). The problem is that when an
image is dynamically inserted in this way (infact its only the location of
the file thats dynamically rendered - not the image itself), i have a 2-3
pixel gap at the bottom of each image. Non dynamically attached images do
not show this behaviour. - I dont understand why this should happen.
I'm using asp 3.0 with vb-script and the image entry is expressed such,
<img src="images/mem_img_sml/<%= rstSearch.Fields("small_img").value%>.jpg"
border=0 width=60 height=60 />

any help would be much appreciated.

Also - modzilla(firefox) decides that i need a password to access my
localhost - but there isnt one! - any suggestions? It wont let me into my
own computer lol

AS
Jul 22 '05 #1
5 1239
show where this is written in the html...
Is there a border on the TD or is there a space before/after the IMG?

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Apple Sauce" <ja********@yahoo.co.uk> wrote in message
news:42***********************@ptn-nntp-reader04.plus.net...
I'm building a site that requires images to be placed into a table
dynamically - the name of each image is drawn from a database reference.
(e.g database entry is "images/image1.jpg" etc). The problem is that when
an
image is dynamically inserted in this way (infact its only the location of
the file thats dynamically rendered - not the image itself), i have a 2-3
pixel gap at the bottom of each image. Non dynamically attached images do
not show this behaviour. - I dont understand why this should happen.
I'm using asp 3.0 with vb-script and the image entry is expressed such,
<img src="images/mem_img_sml/<%=
rstSearch.Fields("small_img").value%>.jpg"
border=0 width=60 height=60 />

any help would be much appreciated.

Also - modzilla(firefox) decides that i need a password to access my
localhost - but there isnt one! - any suggestions? It wont let me into my
own computer lol

AS

Jul 22 '05 #2
Gazing into my crystal ball I observed "Curt_C [MVP]"
<software_AT_darkfalz.com> writing in news:eikkr5jVFHA.3024
@TK2MSFTNGP14.phx.gbl:
show where this is written in the html...
Is there a border on the TD or is there a space before/after the IMG?


Additionally, if there is a carriage return after the TD this will also
produce that effect, so:

%>
<tr><td><img src="<%=image_path%>" /></td></tr>
<% next

should stop that from happening. (To the OP) Of course, if this is not
truly tabular data, you should not be abusing tables, use CSS instead.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #3
here is the table i wrote, as you see there's no border - below is the css
style for the <TD> tages, here there is a border but this does not affect
static images in any way, only the dynamically labelled ones...

<table border="0" width=670 cellpadding=0 cellspacing=0 >
<tr>
<td width=175 height=210 class=main>
<a href="ft_artist_large1.asp?id=<%= objRS.Fields("ID") %>"
target="_blank">
<img src="images/mem_img/<%= objRS.Fields("mid1_img") %>.jpg" border=0>
</a>
</td>... etc.

td.main{

border-width: 1px;
border-style: solid;
border-color: #CFC6B1;
background-color:none;
}

When i select the image (as in drag over it in IE), the whole image is
selected - including the 2 or so pixels of white space bellow, as if that
now belongs to the image. It does seem strange - have a look
http://mafa.org.uk/new/artists.asp , you will see the larger image has this
extra space beneath it yet the static images dont.

Hope you can think of something lol - and thanks for replying.

AS

<td width=10 height=210></td>
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ei**************@TK2MSFTNGP14.phx.gbl...
show where this is written in the html...
Is there a border on the TD or is there a space before/after the IMG?

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Apple Sauce" <ja********@yahoo.co.uk> wrote in message
news:42***********************@ptn-nntp-reader04.plus.net...
I'm building a site that requires images to be placed into a table
dynamically - the name of each image is drawn from a database reference.
(e.g database entry is "images/image1.jpg" etc). The problem is that when an
image is dynamically inserted in this way (infact its only the location of the file thats dynamically rendered - not the image itself), i have a 2-3 pixel gap at the bottom of each image. Non dynamically attached images do not show this behaviour. - I dont understand why this should happen.
I'm using asp 3.0 with vb-script and the image entry is expressed such,
<img src="images/mem_img_sml/<%=
rstSearch.Fields("small_img").value%>.jpg"
border=0 width=60 height=60 />

any help would be much appreciated.

Also - modzilla(firefox) decides that i need a password to access my
localhost - but there isnt one! - any suggestions? It wont let me into my own computer lol

AS


Jul 22 '05 #4
Awww, Thank you Adrienne!!! - thats what it was - my </td> tags were on the
next line down fron the image link - this is how I like to read my code but
i guess it must be bad practice. Never before has this presented a problem -
but you were right on the money with your suggestion and I can't thank you
enough, I dont think I ever would have thought of changing that.

AS
"Adrienne" <ar********@sbcglobal.net> wrote in message
news:Xn***************************@207.115.63.158. ..
Gazing into my crystal ball I observed "Curt_C [MVP]"
<software_AT_darkfalz.com> writing in news:eikkr5jVFHA.3024
@TK2MSFTNGP14.phx.gbl:
show where this is written in the html...
Is there a border on the TD or is there a space before/after the IMG?


Additionally, if there is a carriage return after the TD this will also
produce that effect, so:

%>
<tr><td><img src="<%=image_path%>" /></td></tr>
<% next

should stop that from happening. (To the OP) Of course, if this is not
truly tabular data, you should not be abusing tables, use CSS instead.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jul 22 '05 #5
Gazing into my crystal ball I observed "Apple Sauce"
<ja********@yahoo.co.uk> writing in
news:42**********************@ptn-nntp-reader02.plus.net:
Awww, Thank you Adrienne!!! - thats what it was - my </td> tags were
on the next line down fron the image link - this is how I like to read
my code but i guess it must be bad practice. Never before has this
presented a problem - but you were right on the money with your
suggestion and I can't thank you enough, I dont think I ever would have
thought of changing that.

AS

Glad I was able to help. This "bug" has been around for a long, long,
time. As I said before, if this isn't tabular data, you're better off
using CSS.

"Adrienne" <ar********@sbcglobal.net> wrote in message
news:Xn***************************@207.115.63.158. ..
Gazing into my crystal ball I observed "Curt_C [MVP]"
<software_AT_darkfalz.com> writing in news:eikkr5jVFHA.3024
@TK2MSFTNGP14.phx.gbl:
> show where this is written in the html...
> Is there a border on the TD or is there a space before/after the
> IMG?
>


Additionally, if there is a carriage return after the TD this will
also produce that effect, so:

%>
<tr><td><img src="<%=image_path%>" /></td></tr>
<% next

should stop that from happening. (To the OP) Of course, if this is
not truly tabular data, you should not be abusing tables, use CSS
instead.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share



--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Johannes Götzinger | last post: by
5 posts views Thread by K | last post: by
1 post views Thread by duncan.lovett | last post: by
3 posts views Thread by JOSEPHINE ALVAREZ | last post: by
3 posts views Thread by NateDawg | last post: by
9 posts views Thread by pbd22 | last post: by
3 posts views Thread by =?Utf-8?B?UiBSZXllcw==?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.