Welcome visitor
* Login
* Register
It is currently July 24th, 2019, 5:07 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 3 posts ] 
Author Message
  same background image for two table cells
PostPosted: October 10th, 2009, 9:12 pm 
User avatar

Posts: 52
Is it possible to have a background picture for two cells only in a table? But I dont want to have the same image 2 times, just one image for both cells, is this possible? Thank you friends.


Top
 Profile  
 
  Re: background images for a table
PostPosted: October 10th, 2009, 9:43 pm 
User avatar

Posts: 70
what about using collspan?


Top
 Profile  
 
  Re: background images for a table
PostPosted: October 10th, 2009, 9:57 pm 
User avatar

Posts: 21
I see two possible ways to accomplish what you want:

1.- Split your image in two parts matching to the size of your table cells (using photoshop or any other image manipulation software), then use each image for its respective cell.

2.- Use the same background image for both cells (<td>) but in the second one adjust the offset of the background using the background-position CSS property.

Example:

<td style="background-image: url('picture.jpg');  background-repeat:no-repeat; background-attachment:fixed; background-position: -100px 0px;">

In the example, I am assuming that the first <td> or cell has a width of 100px, this way, when I set the background-position CSS property of the second cell to -100px, the background image will be moved 100 pixels to the left, starting, hopefully, right where the background of the first cell ended.

I hope this is helpfull.

REGARDS

_________________
IT. Consulting
www.tnogos.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron