non-repeating table background

liunx

Guest
Is there any way to make a table background image non-repeating? I know i can make the table the exact same size as the background image, but is there a different way?<br />
<br />
- Larzman<!--content-->Use CSS:<br />
<br />
<table style="background: url (img.gif) no-repeat"><!--content-->thanks a bunch, I couldn't remember exactly how to code it with a Style.<br />
<br />
- Larzman<!--content-->You're welcome... :)<!--content-->Well, I thought I had it figured out, but... The current table code is<br />
<br />
<table width="94%" border="0" align="right" cellpadding="0" cellspacing="0" background="../images/healthcare/resp_net/bg_full_c25.jpg" bgcolor="#FFFFFF"><br />
<br />
I tried it using the style you suggested, but it didn't work. Maybe I'm not getting the syntax correct, although it looks right. Is this correct? It's not working in IE6 or NN7.<br />
<br />
<table width="94%" border="0" align="right" cellpadding="0" cellspacing="0" style="background: ../images/healthcare/resp_net/bg_full_c25.jpg (bg_full_c25.jpg) no-repeat"><!--content-->No, it should be like this:<br />
<br />
style="background: url (../images/healthcare/resp_net/bg_full_c25.jpg) no-repeat"<!--content-->well, I tried it exactly as you posted, unfortunately, still not working. I published a test page using your code at the following address:http://www.rauland.com/healthcare/hc_template_r030811.htm<br />
<br />
The non-repeating table background I'm trying to use is also the table background image near the top of that page (nurse using a touchscreen). The test code is at the table at the bottom of that page. As you can see, the table background is repeating in the top table (barely visible line at bottom of table). <br />
<br />
Any suggestions or solutions to my dilemna would be greatly appreciated.<br />
<br />
Larry<!--content-->I did not see where you used the code I posted... It looks to me like you are still using the HTML attribute "background" to do it. Also, I must recommend using valid HTML 4.01. You are using tables for layout (which is not recommended) and many depreciated tags and attributes (<font>, align, etc...)<!--content-->the code you suggested is used on the bottom table (cell 1, cell 2...). I put it into a new table just to test the code. Still no-go...<br />
<br />
I can't help the tables being used for layout, that is the way the site was designed (before I came here). In your opinion, would it be better to use CSS or XML for layouts in the future?<!--content-->That's not an either/or type of deal. CSS is used to format/layout the page, while XML is used to markup the page. In the future, they will be used together...<!--content-->I suggest you learn to use XHTML for structure and CSS for styling.<!--content--><TABLE style="background:url(yourpic.jpg) no-repeat fixed 50% 50%" cellSpacing=0 cellPadding=0 width=740 height=200 align=center border=1><br />
<TBODY><br />
<TR><br />
<TD>cell 1</TD><br />
<TD>cell 2</TD><br />
<TD>cell 3</TD></TR><br />
<TR><br />
<TD>cell 4</TD><br />
<TD>cell 5</TD><br />
<TD>cell 6</TD></TR></TBODY></TABLE><!--content-->Thanks to all for your assistance. I got it to work in all browsers.<!--content-->
 
Back
Top