Image padding prevention / issue

Discussion in 'HTML' started by Carl Gilbert, Dec 6, 2004.

  1. Carl Gilbert

    Carl Gilbert Guest

    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.
     
    Carl Gilbert, Dec 6, 2004
    #1
    1. Advertising

  2. Carl Gilbert

    Mark Parnell Guest

    Previously in alt.html, Carl Gilbert <> 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
     
    Mark Parnell, Dec 6, 2004
    #2
    1. Advertising

  3. Carl Gilbert

    Neal Guest

    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.
     
    Neal, Dec 6, 2004
    #3
  4. Carl Gilbert

    Augustus Guest

    "Carl Gilbert" <> wrote in message
    news:fL5td.582$...
    > 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)
     
    Augustus, Dec 7, 2004
    #4
  5. Carl Gilbert

    Richard Guest

    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
     
    Richard, Dec 7, 2004
    #5
  6. Carl Gilbert

    Richard Guest

    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.
     
    Richard, Dec 7, 2004
    #6
  7. Carl Gilbert

    rf Guest

    Richard wrote
    > Neal wrote:


    > > A URL is worth a thousand words.


    > http://c:\recycle.bin


    404

    --
    Cheers
    Richard.
     
    rf, Dec 7, 2004
    #7
  8. Carl Gilbert

    Toby Inkster Guest

    Toby Inkster, Dec 8, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Curry
    Replies:
    1
    Views:
    502
    Anon-E-Moose
    Jul 23, 2004
  2. greenvelvet

    selective hotlink prevention

    greenvelvet, Oct 4, 2005, in forum: HTML
    Replies:
    1
    Views:
    430
    greenvelvet
    Oct 4, 2005
  3. cool2005

    Duplicate submission prevention

    cool2005, Sep 26, 2006, in forum: Java
    Replies:
    3
    Views:
    2,018
    cool2005
    Sep 26, 2006
  4. Replies:
    0
    Views:
    283
  5. Kimmo R. M. Hovi
    Replies:
    2
    Views:
    376
    William Morris
    Apr 14, 2004
Loading...

Share This Page