Jump to content

Repeat-y, not working


Goodfella

Recommended Posts

 // The logo, user information, news, and menu.   echo ' <table cellspacing="0" cellpadding="0" border="0" align="center" width="95%" class="tborder" style="background: url('.$settings['images_url'].'/left.gif) repeat-y;"><img src="'.$settings['images_url'].'/left.gif" alt="" />;                     

Hi, im trying to repeat an image, but it only appears one time, at the top-left. I want join an image to the border of a table to make it a background.

Link to comment
Share on other sites

The <? ?> should produce an error, as it's already withintags, and a echo!"First change this

background: url('.$settings['images_url'].'/left.gif) repeat-y;"

to this:

background: url(\''.$settings['images_url'].'/left.gif\') repeat-y;"

Note the quoted ' (\')...Also make shure that the class tbody doesn't overwrite the background...The PHP seams ok (since you see the images) so this is realy an CSS question...When i took a closer look I found some problems (at least in the version you display here..):First you don't end the string!Second: you can't put an image directly in an table!This is better:

echo "\n\n".'<table cellspacing="0" cellpadding="0" border="0" align="center" width="95%" class="tborder" style="background: url(\''.$settings['images_url'].'/left.gif\') repeat-y;">'."\n";echo '<tr><td><img src="'.$settings['images_url'].'/left.gif" alt="" /></td></tr>';

Then I don't get why you use the backround in the table as an "alone image"... it can't look good..Hope that helps!Good Luck and Don't Panic!

Link to comment
Share on other sites

Ok, thx for the tip.I think if you can see my forum its more easier to understand or to explain myself.http://forum.pt-sys.netIm trying to put an image with repeat-y in the left and right border.
Sorry, but I can't find the part you have in your first post in the HTML code in that forum, so it's hard to help...But this is an example on how you could do it (as I can't find the right part of the HTML...)
<table ...> <tr>	 <td style="height: 100%; background: url('<?php echo $settings['images_url']?>/left.gif') repeat-y;"> </td> </tr><tr>	 <td>		  <table..> /* Content table */ </table>	 </td> </tr><tr>	 <td style="height: 100%; background: url('<?php echo $settings['images_url']?>/right.gif') repeat-y;"> </td> </tr>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...