Jump to content


Photo

Tiling vertically instead of horizontally?


  • Please log in to reply
3 replies to this topic

#1 aviatorisu

aviatorisu
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 04 September 2006 - 02:37 PM

I'm not sure if this is a PHP issue or an HTML issue, but I'm having a little trouble with my PHP IF statements tiling vertically instead of horizonally like I want them to.

This code:

<?php
			if ( $picture1 != NULL ) {
    			echo "<BR><A HREF='' TARGET=''>[1]</A>";
			}
			?>

			<?php
			if ( $picture2 != NULL ) {
    			echo "<BR><A HREF='' TARGET=''>[2]</A>";
			}
			?>
			[3]
			[4]
			[5]

is producing this result:

Posted Image

I've not had this problem before, and my brain is melting trying to think about it and redo it 5 billion times.  I want it to continue to tile horizonally like 3, 4, and 5 do.

Anyone have any thoughts??

Thanks,

~Z~

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 04 September 2006 - 02:39 PM

You need to put a <BR> before the [3] [4] and [5]
follow me on twitter @PHPsycho

#3 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 04 September 2006 - 02:42 PM

It's an html issue caused by your <BR> tags.  If you omit them, the images would run horizontally until they ran out of screen space then drop down and continue.  You could 'control' the output by reconstructing your code to place the images in table data cells and periodically ending/starting a new row in a table.
Legend has it that reading the manual never killed anyone.
My site

#4 aviatorisu

aviatorisu
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 04 September 2006 - 02:46 PM

I'm an idiot...I didn't even see that I had BR tags in there!

Issue resolved.  Chalk one up AGAIN for the PHPFreaks!

~Z~




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users