Stopping images from tiling. at DVinfo.net

Go Back   DV Info Net > And Now, For Something Completely Different... > The TOTEM Poll: Totally Off Topic, Everything Media

The TOTEM Poll: Totally Off Topic, Everything Media
Let's talk about anything media related.


Reply
 
Thread Tools Search this Thread
Old September 3rd, 2003, 06:30 AM   #1
Trustee
 
Join Date: Oct 2001
Location: Chigasaki, Japan.
Posts: 1,660
Stopping images from tiling.

I'm trying to figure how to use a background image in a table cell and stop it from tiling. Is there any html code that does this? I'm trying to get a small image in the lower right corner of a table cell to brighten up the page.
Adrian Douglas is offline   Reply With Quote
Old September 3rd, 2003, 10:30 AM   #2
Air China Pilot
 
Join Date: May 2002
Location: Vancouver, B.C.
Posts: 2,389
You can use .css to fix the position of the background image.

body {
background: url(graphic.jpg) fixed no-repeat;
}

Make sure the edges of the graphic are the same colour as the background colour for the page or it will look funny.

The easier way is to make the background image larger than the cel otherwise it will always repeat if the cel is larger than the image.
__________________
--
Visit http://www.KeithLoh.com | stuff about living in Vancouver | My Flickr photo gallery
Keith Loh is offline   Reply With Quote
Old September 3rd, 2003, 07:23 PM   #3
Trustee
 
Join Date: Oct 2001
Location: Chigasaki, Japan.
Posts: 1,660
Thanks Keith, does that work for table cells or just the body of the entire page.

I'll give it a try and see how it goes.
Adrian Douglas is offline   Reply With Quote
Old September 4th, 2003, 10:45 AM   #4
Regular Crew
 
Join Date: Jul 2003
Location: Tucson, AZ
Posts: 63
You can apply a background image to just about any element in modern browsers, and set them to not repeat, etc.

It sounds like you want to target just one cell in your table. Id give that TD and id and in the CSS make a rule like:

td#notile {
background: url(graphic.jpg) no-repeat;
}

You don't need want the "fixed" part unless you want the image to remain stationary on the page (not scroll). The no-repeat is what keeps it from tiling.

Then in the HTML the markup for that table cell would look something like:

<td id="notile">Cell contents</td>

Hope this helps!
__________________
--Mark
Mark Newhouse is offline   Reply With Quote
Old September 4th, 2003, 12:04 PM   #5
Air China Pilot
 
Join Date: May 2002
Location: Vancouver, B.C.
Posts: 2,389
//You don't need want the "fixed" part unless you want the image to remain stationary on the page (not scroll). The no-repeat is what keeps it from tiling.//

Good correction. I was doing this last night and didn't cut it out of my example.
__________________
--
Visit http://www.KeithLoh.com | stuff about living in Vancouver | My Flickr photo gallery
Keith Loh is offline   Reply With Quote
Old September 4th, 2003, 12:14 PM   #6
Regular Crew
 
Join Date: Jul 2003
Location: Tucson, AZ
Posts: 63
Heh. CSS and web design is my area of expertise, so that is why I had to jump in (not to correct, but to help out), since I don't have much to add to anything DV related. Yet.

Best,
__________________
--Mark
Mark Newhouse is offline   Reply With Quote
Old September 4th, 2003, 08:54 PM   #7
Trustee
 
Join Date: Oct 2001
Location: Chigasaki, Japan.
Posts: 1,660
Thanks to both of you. I'll see how I go today. I really haven't kept up with my web work that much here in Japan so I really appreciate your input.

What about positioning? The default is top left of the cell but I want it in the bottom right.
Adrian Douglas is offline   Reply With Quote
Old September 10th, 2003, 10:18 AM   #8
Regular Crew
 
Join Date: Sep 2003
Location: Worcester, MA
Posts: 64
Then you can actually just add "bottom right" to the CSS entry.

td.notile {
background: url(graphic.jpg) no-repeat bottom right;
}

Should put it right where you want.
Jon Yurek is offline   Reply With Quote
Old September 11th, 2003, 12:09 AM   #9
Trustee
 
Join Date: Oct 2001
Location: Chigasaki, Japan.
Posts: 1,660
Thanks guys, I fired up Dreamweaver MX and low and behold there it was.
Adrian Douglas is offline   Reply
Reply

DV Info Net refers all where-to-buy and where-to-rent questions exclusively to these trusted full line dealers and rental houses...

Professional Video
(800) 833-4801
Portland, OR

B&H Photo Video
(866) 521-7381
New York, NY

Z.G.C.
(973) 335-4460
Mountain Lakes, NJ

Abel Cine Tech
(888) 700-4416
N.Y. NY & L.A. CA

Precision Camera
(800) 677-1023
Austin, TX

DV Info Net also encourages you to support local businesses and buy from an authorized dealer in your neighborhood.
  You are here: DV Info Net > And Now, For Something Completely Different... > The TOTEM Poll: Totally Off Topic, Everything Media

Thread Tools Search this Thread
Search this Thread:

Advanced Search

 



Google
 

All times are GMT -6. The time now is 12:32 PM.


DV Info Net -- Real Names, Real People, Real Info!
1998-2017 The Digital Video Information Network