User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 375,207 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,300 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 19798 | Replies: 4
Reply
Join Date: Oct 2003
Location: Franklin, Tennessee
Posts: 185
Reputation: buddyb is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
buddyb buddyb is offline Offline
Junior Poster

Single Table Cell background

  #1  
Dec 23rd, 2004
If you're going to use a .gif or .jpg as a background in a <td> cell is there a way to keep it from repeating? I've not much fortune with it at this point.
Thanks,
BuddyB
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,589
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 34
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: Single Table Cell background

  #2  
Dec 23rd, 2004
Use CSS background property, set to either no-repeat, repeat-x, or repeat-y.
Reply With Quote  
Join Date: Jul 2004
Location: Wales
Posts: 735
Reputation: DaveSW is on a distinguished road 
Rep Power: 6
Solved Threads: 17
DaveSW's Avatar
DaveSW DaveSW is offline Offline
Master Poster

Re: Single Table Cell background

  #3  
Dec 23rd, 2004
the full code for that is:
<td style="background: #ffffff url(graphics.png) left no-repeat;"></td>
If you visit the property table on the w3 website they have a list: http://www.w3.org/TR/CSS21/propidx.html click the individual items on the second column of the background property for samples and a full explanation.

You can omit whatever you want from those values (e.g. the color).
Reply With Quote  
Join Date: Oct 2003
Location: Franklin, Tennessee
Posts: 185
Reputation: buddyb is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
buddyb buddyb is offline Offline
Junior Poster

Re: Single Table Cell background

  #4  
Dec 27th, 2004
Originally Posted by DaveSW
the full code for that is:
<td style="background: #ffffff url(graphics.png) left no-repeat;"></td>
If you visit the property table on the w3 website they have a list: http://www.w3.org/TR/CSS21/propidx.html click the individual items on the second column of the background property for samples and a full explanation.

You can omit whatever you want from those values (e.g. the color).

That works beautifully! Thanks! I'm placing some nav buttons on top of that background image, and because I've used a drop shadow on it they're off center (but not really..just look it). Within the framework of that data cell is there some way to to position the x factor more precisely so that it looks centered in the main part of the background image?
BuddyB
Reply With Quote  
Join Date: Jul 2004
Location: Wales
Posts: 735
Reputation: DaveSW is on a distinguished road 
Rep Power: 6
Solved Threads: 17
DaveSW's Avatar
DaveSW DaveSW is offline Offline
Master Poster

Re: Single Table Cell background

  #5  
Dec 29th, 2004
instead of left you could use:
0px 0px (that's left then top I think)
middle/center (can't remember - check the spec if you want more info on that.)

http://www.w3.org/TR/CSS21/colors.ht...round-position
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb HTML and CSS Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 2:45 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC