Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Image padding prevention / issue

Reply
Thread Tools

Image padding prevention / issue

 
 
Carl Gilbert
Guest
Posts: n/a
 
      12-06-2004
Hi

I have a fairly basic page the consists of a few tables and some images.

I have one table in the center of the page and I am setting the border,
cellpadding and cellspacing to zero.
I am also setting the border to ridge and setting a background image.

The dimensions of the table are 800x533 and the same applies to the image
that I am using for the background.

All is fine when there is just the table and the background image.

Now if I put an transparent image in the table using <TR><TD><IMG...> etc,
and set this image to 800x533, the height of the table increases slightly.

Say I then put 5 or 6 transparent images in the table and set their heights
to total 533 exactly, the table will increase by 5 or 6 times more than when
I had just one image in the table.

The result is that the image in the background will now start to draw a
second time in a tile effect in order to fill the table area.

I think what is happening, is when I add an image, there are some padding
issues with the images so even though the images within the table add up to
533, the area in which they actually take up is more like 550 or 560
depending on the number of images being stacked up.

Is there anyway to prevent the form from putting such padding on images so
that they line up next to each other rather than leaving a gap?

Regards, Carl Gilbert.


 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      12-06-2004
Previously in alt.html, Carl Gilbert <(E-Mail Removed)> said:

> Hi


G'day.

> I have a fairly basic page the consists of a few tables and some images.


Right answer: Drop the tables for layout and the transparent images and
learn CSS.

Short answer: This is good[1]:

<td><img ...></td>

This is not:

<td> <img ...> </td>

Nor is this:

<td>
<img ...>
</td>

[1] Good in the context of that answer - the right answer is obviously
much better.

--
Mark Parnell
http://www.clarkecomputers.com.au
 
Reply With Quote
 
 
 
 
Neal
Guest
Posts: n/a
 
      12-06-2004
Carl:

> I have a fairly basic page the consists of a few tables and some images.
> ... prevent the form from putting such padding on images so
> that they line up next to each other rather than leaving a gap?


A URL is worth a thousand words.

 
Reply With Quote
 
Augustus
Guest
Posts: n/a
 
      12-07-2004

"Carl Gilbert" <(E-Mail Removed)> wrote in message
news:fL5td.582$(E-Mail Removed)...
> Hi
>
> I have a fairly basic page the consists of a few tables and some images.

<snip>
>


You are going to alot of trouble to protect your images...

The thing is:
When it comes to "Joe Average User" your method, like every other method,
might work... but then again it might not.

But the problem is: when it comes to the people that matter (people that
will take your images and use them on websites or in graphic/print media,
etc) none of the methods will work.

In short: you are wasting your time... because anybody who really wants
your images for an ulterior motive will already know how to get them or be
able to easily find out

Put a transparent image over your image? Doesn't work: they can right click
the image and instead of clicking "save image as" they just choose "save
background as". Or they can go into their cache

Disable right click? Doesn't work: they can just turn scripting off. Or
they can go into their cache

And even if you came up with some super innovative way to protect your
images and prevented them from being cached on the users computer... they
can always just fall back on good ol' screenshot. I just press the "Fn" key
and "PrtSc" and go in to Photoshop and voila, I got your picture (if you
picture is bigger than the screen then I just take multiple shots and piece
them together)




 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      12-07-2004
Neal wrote:

> Carl:


>> I have a fairly basic page the consists of a few tables and some images.
>> ... prevent the form from putting such padding on images so
>> that they line up next to each other rather than leaving a gap?


> A URL is worth a thousand words.



http://c:\recycle.bin


 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      12-07-2004
Carl Gilbert wrote:

> Hi


> I have a fairly basic page the consists of a few tables and some images.


> I have one table in the center of the page and I am setting the border,
> cellpadding and cellspacing to zero.
> I am also setting the border to ridge and setting a background image.


Table cells have a tendency to increase when you add more than what you
designed them to hold.
Your first mistake is setting the cell size to the same size as the image.
Then you set the padding to zero.
So why not just turn the borders off?
Your next mistake is the size of the image.
Now you want to compound the issue of adding in yet more images while you
want the table cell to remain the same size?
Ain't gonna happen.
If you would learn a little simple CSS, you could manage the images with
divisions much easier.


 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      12-07-2004
Richard wrote
> Neal wrote:


> > A URL is worth a thousand words.


> http://c:\recycle.bin


404

--
Cheers
Richard.



 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      12-08-2004
rf wrote:
> Richard wrote
>
>> http://c:\recycle.bin

>
> 404


That's more that I get. I just get:

ERROR: Dns can't solve c

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Someone help a CSS newbie: why is there extra bottom padding on image? steve HTML 2 07-05-2007 08:10 AM
Re: Imagebutton padding issue bruce barker ASP .Net 0 12-15-2006 09:56 PM
padding on image in IE windandwaves HTML 2 08-19-2005 10:22 PM
Form submission prevention with <input type=image onclick=..> Kimmo R. M. Hovi Javascript 2 04-14-2004 04:26 PM
<tr> with a 1x1 image as a filler on a table with padding of 2 look thicker in netscape but they look ok in IE. Serial # 19781010 HTML 1 08-10-2003 09:05 PM



Advertisments