Larzman
08-11-2003, 12:28 PM
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?
- Larzman
- Larzman
|
Click to See Complete Forum and Search --> : non-repeating table background Larzman 08-11-2003, 12:28 PM 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? - Larzman pyro 08-11-2003, 12:33 PM Use CSS: <table style="background: url (img.gif) no-repeat"> Larzman 08-11-2003, 01:16 PM thanks a bunch, I couldn't remember exactly how to code it with a Style. - Larzman pyro 08-11-2003, 01:17 PM You're welcome... :) Larzman 08-11-2003, 01:30 PM Well, I thought I had it figured out, but... The current table code is <table width="94%" border="0" align="right" cellpadding="0" cellspacing="0" background="../images/healthcare/resp_net/bg_full_c25.jpg" bgcolor="#FFFFFF"> 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. <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"> pyro 08-11-2003, 01:34 PM No, it should be like this: style="background: url (../images/healthcare/resp_net/bg_full_c25.jpg) no-repeat" Larzman 08-11-2003, 03:36 PM 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 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). Any suggestions or solutions to my dilemna would be greatly appreciated. Larry pyro 08-11-2003, 03:41 PM 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...) Larzman 08-12-2003, 07:20 AM 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... 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? pyro 08-12-2003, 08:51 AM 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... Robert Wellock 08-12-2003, 09:54 AM I suggest you learn to use XHTML for structure and CSS for styling. Mr J 08-12-2003, 01:49 PM <TABLE style="background:url(yourpic.jpg) no-repeat fixed 50% 50%" cellSpacing=0 cellPadding=0 width=740 height=200 align=center border=1> <TBODY> <TR> <TD>cell 1</TD> <TD>cell 2</TD> <TD>cell 3</TD></TR> <TR> <TD>cell 4</TD> <TD>cell 5</TD> <TD>cell 6</TD></TR></TBODY></TABLE> Larzman 08-21-2003, 08:46 AM Thanks to all for your assistance. I got it to work in all browsers. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |