Using <div> to place a picture across a cell border

Discussion in 'HTML' started by Fokke Nauta, Feb 21, 2012.

  1. Fokke Nauta

    Fokke Nauta Guest

    Hi all,

    I have a news letter, created by a table with cells. There is some text and
    pictures in it. One picture, now placed in the top cell, I want to place
    partly over the cell border, so that the picture lies over the top cell and
    the cell below. Is this possible anyway?
    You can find my news letter here: www.pc3.nl/test/nieuwsbrief.htm. When you
    look into the www.pc3.nl/test directory, you'll see a picture as well. This
    is not used but shows how I want the picture to be placed.

    I doubt if it can be done, but one never knows ...

    Many thanks in advance for your help.
    With best regards,
    Fokke Nauta
    Fokke Nauta, Feb 21, 2012
    #1
    1. Advertising

  2. 2012-02-21 17:25, Fokke Nauta wrote:

    > I have a news letter, created by a table with cells. There is some text and
    > pictures in it. One picture, now placed in the top cell, I want to place
    > partly over the cell border, so that the picture lies over the top cell and
    > the cell below. Is this possible anyway?


    Yes, and it’s rather easy. You just use relative positioning, which
    means that an element is displaced from the position it would otherwise
    occupy, by the amount you specify using the top, right, bottom, or left
    properties. Example:

    img {
    position: relative;
    top: 45px;
    }

    This would displace _every_ image, so it’s not suitable, but you can add
    an id attribute to the <img> element, say id="photo", and use the
    selector #photo instead of the selector img.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Feb 21, 2012
    #2
    1. Advertising

  3. Fokke Nauta

    Fokke Nauta Guest

    "Jukka K. Korpela" <> wrote in message
    news:ji0i33$90m$...
    > 2012-02-21 17:25, Fokke Nauta wrote:
    >
    >> I have a news letter, created by a table with cells. There is some text
    >> and
    >> pictures in it. One picture, now placed in the top cell, I want to place
    >> partly over the cell border, so that the picture lies over the top cell
    >> and
    >> the cell below. Is this possible anyway?

    >
    > Yes, and it's rather easy. You just use relative positioning, which means
    > that an element is displaced from the position it would otherwise occupy,
    > by the amount you specify using the top, right, bottom, or left
    > properties. Example:
    >
    > img {
    > position: relative;
    > top: 45px;
    > }
    >
    > This would displace _every_ image, so it's not suitable, but you can add
    > an id attribute to the <img> element, say id="photo", and use the selector
    > #photo instead of the selector img.
    >
    > --
    > Yucca, http://www.cs.tut.fi/~jkorpela/


    Thanks very much, Jukka.
    I would never believe it was that simple!
    Great help.

    Best regards,
    Fokke
    Fokke Nauta, Feb 21, 2012
    #3
    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. tshad
    Replies:
    0
    Views:
    2,243
    tshad
    Jan 31, 2005
  2. CaptCaveman1

    Place div beneath another div

    CaptCaveman1, Feb 6, 2011, in forum: HTML
    Replies:
    2
    Views:
    736
    richard
    Feb 6, 2011
  3. Jon
    Replies:
    2
    Views:
    184
  4. Replies:
    8
    Views:
    1,226
    Mick White
    Apr 19, 2005
  5. Replies:
    0
    Views:
    114
Loading...

Share This Page