Page 1 of 1

How can i do this?? (easy)

Posted: Fri Apr 21, 2006 7:15 pm
by Maluendaster
I have a script that randomize images + text in tables, and look like this...

(5 or more rows, just 1 column)

Image

But i want that the tables look like this...

(5 rows and 1 or more columns with no Text, just the image, (ill be adding colums) )
Image

I think this is the code...

Code: Select all

$links[0][link] = "<table width=\"250\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td><a href=\"http://regretless.com\" target=\"_blank\"><img src=\"regretless.gif\" border=\"0\" align=\"right\" width=\"75\" height=\"75\" style=\"filter:alpha(opacity=40)\" onMouseover=\"high(this)\" onMouseout=\"low(this)\"></a><font face=verdana size=1>regretless.com is dodo's collective domain where you can find all of her sites.</font></td></tr></table>";
	$links[0][priority] = 1;

	$links[1][link] = "<table width=\"250\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td><a href=\"http://pure-essence.net\" target=\"_blank\"><img src=\"pureessence.gif\" border=\"0\" align=\"right\" width=\"75\" height=\"75\" style=\"filter:alpha(opacity=40)\" onMouseover=\"high(this)\" onMouseout=\"low(this)\"></a><font face=verdana size=1>pure-essence.net is dodo's personal domain that shows who she is in real life and has her blog.</font></td></tr></table>";
	$links[1][priority] = 1;

	$links[2][link] = "<table width=\"250\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td><a href=\"http://board.regretless.com\" target=\"_blank\"><img src=\"dmb.gif\" border=\"0\" align=\"right\" width=\"75\" height=\"75\" style=\"filter:alpha(opacity=40)\" onMouseover=\"high(this)\" onMouseout=\"low(this)\"></a><font face=verdana size=1>dmb is dodo's popular message board. it's G rated and welcome all friendly members.</font></td></tr></table>";
	$links[2][priority] = 1;
Thank you....

Re: How can i do this?? (easy)

Posted: Fri Apr 21, 2006 7:22 pm
by Christopher
Move the <table> and <tr> outside your code:

Code: Select all

$links[0][link] = "<td><a href=\"http://regretless.com\" target=\"_blank\"><img src=\"regretless.gif\" border=\"0\" align=\"right\" width=\"75\" height=\"75\" style=\"filter:alpha(opacity=40)\" onMouseover=\"high(this)\" onMouseout=\"low(this)\"></a></td>";
	$links[0][priority] = 1;

	$links[1][link] = "<td><a href=\"http://pure-essence.net\" target=\"_blank\"><img src=\"pureessence.gif\" border=\"0\" align=\"right\" width=\"75\" height=\"75\" style=\"filter:alpha(opacity=40)\" onMouseover=\"high(this)\" onMouseout=\"low(this)\"></a></td>";
	$links[1][priority] = 1;

	$links[2][link] = "<td><a href=\"http://board.regretless.com\" target=\"_blank\"><img src=\"dmb.gif\" border=\"0\" align=\"right\" width=\"75\" height=\"75\" style=\"filter:alpha(opacity=40)\" onMouseover=\"high(this)\" onMouseout=\"low(this)\"></a></td>";
	$links[2][priority] = 1;

Posted: Fri Apr 21, 2006 7:46 pm
by Maluendaster
Thank you! it worked good, but for some reason, the table it's aligned Right.... i put the align=center or left in the <table> tag but nothing happened. how can i fix this?