Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Using <div> to place a picture across a cell border

Reply
Thread Tools

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

 
 
Fokke Nauta
Guest
Posts: n/a
 
      02-21-2012
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


 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      02-21-2012
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/
 
Reply With Quote
 
 
 
 
Fokke Nauta
Guest
Posts: n/a
 
      02-21-2012
"Jukka K. Korpela" <(E-Mail Removed)> wrote in message
news:ji0i33$90m$(E-Mail Removed)...
> 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


 
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
border-color: #003366; border-width: 2px; =?UTF-8?B?TWFydGluIFDDtnBwaW5n?= HTML 64 07-30-2006 04:01 PM
Drop Down List Border Width vs Text Box Border Width Coder ASP .Net 1 06-24-2006 01:27 PM
row bottom border in inner table not matching up with row border in outer table phl HTML 1 06-08-2006 03:43 PM
Datagrid Border showing when I say no border tshad ASP .Net 0 01-31-2005 05:40 PM
Border for only portion of a cell? VB Programmer ASP .Net 2 06-10-2004 12:27 PM



Advertisments