placing backgrounds in tables?

admin

Administrator
Staff member
whats the proper way to insert a background within a table?<br />
like if i want to tile a tables background?<!--content--><table style="background: url('file.jpg')"><!--content-->Two ways:<br />
<br />
<style type="text/css"><br />
table { background: url("myimage.jpg") repeat fixed }<br />
</style><br />
<br />
Or you can use <table style="background: url('myimage.jpg') repeat fixed"><br />
<br />
Peg<!--content-->how can somthing repeat if it is fixed? :P<br />
<br />
besides, you don't need either one of those. by default it will repeat if the image has room.<!--content-->Originally posted by scoutt <br />
how can somthing repeat if it is fixed? :P<br />
<br />
besides, you don't need either one of those. by default it will repeat if the image has room. <sigh> Because, dear, beautiful, blue, furry critter, I copied it directly from the CSS handbook and I must have slipped a line. <blush> I know where to look for CSS information, I just don't always know how to write it. *g*<br />
<br />
Peg<!--content-->oh, ok then, I guess you are excused :D<!--content-->i did this and it worked<br />
<br />
<td bgcolor="#000000" colspan="2" background="http://cordoba.50free.net/cloth.jpg"><br />
<br />
<br />
i tried the other way at first and it didnt work but then i think the server for my host is just slow in updating changes, im going to try the other way again.<br />
<br />
im thinking the way i posted above is not valid code.<!--content-->you are right, that is not valid code. that is deprecated and shouldn't be used. the css way is the best way and valid.<!--content-->it seems theres another way to thats not CSS and thats not deprecated its been so long since ive done it though.<br />
<br />
this is the file:<br />
<br />
<!-- m --><a class="postlink" href="http://cordoba.50free.net/cloth.jpg">http://cordoba.50free.net/cloth.jpg</a><!-- m --><br />
<br />
<table style="background: url('file.jpg')"><br />
<br />
so the url goes in between url('file.jpg')<br />
<br />
am i understanding this correctly?<br />
<br />
for instance:<br />
<br />
url('http://cordoba.50free.net/cloth.jpg')"><br />
<br />
<table style="background: url('http://cordoba.50free.net/cloth.jpg')"><!--content-->yes that is correct.<br />
<br />
and there is NO other way besides css.<!--content-->Yep, that's the same thing. background and background-image will both work.<!--content-->well if im going to do my table in css i have to do the other attributes/declarations in CSS to.<br />
<br />
how do i do the width for lets say 100% ?<!--content-->add width: 100%; to the style="" attribute.<br />
<br />
It would probably be a good idea to make an external stylesheet for all of this. Makes things uberly easier.<!--content-->
 
Back
Top