Re: [PHP] Annoying display problem

2002-05-23 Thread Miguel Cruz

The obvious answer would be a table.

miguel

On Thu, 23 May 2002, Andre Dubuc wrote:
 PHP 4.1.2 + Apache 1.3.23 + PostgreSQL 7.2
 
 I've put off trying to figure out how to accomplish a fairly simple display 
 problem. It's probably so simple, that I keep missing it.
 
 Here's what I'd like to accomplish:
 
 I want an image (aligned on the left side) with text beside it (aligned in 
 the center). That sounds simple enough. But try as I may, I can't get it to 
 work.
 
 Here's the code I've tried:
 
 ***
 
 ?php
 // lotsa stuff
 
 print brdiv align='left'img src='709-2585.jpg' width='120' 
 height='120' alt=' '//a/divdiv 
 align='center'{$_SESSION['desc']}/divbr;
 
 // more stuff
 ?
 
 ***
 
 What it displays:
 
 The pix is on the left where it should be, but the text isn't centered, but 
 hangs either just underneath the pix. I've seen many sites with this layout. 
 Perhaps they've separated the image/text. But I can't figure out how they did 
 it.
 
 Any ideas?
 
 Will greatly appreciate some suggestions, and at this point, hand-slapping 
 for missing the obvious:
 
 Tia, Andre
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Annoying display problem

2002-05-23 Thread Andre Dubuc

Miguel,

It's been a long day - thanks. (Duh at this end!)

Regards, Andre

On Thursday 23 May 2002 04:54 pm, you wrote:
 The obvious answer would be a table.

 miguel

 On Thu, 23 May 2002, Andre Dubuc wrote:
  PHP 4.1.2 + Apache 1.3.23 + PostgreSQL 7.2
 
  I've put off trying to figure out how to accomplish a fairly simple
  display problem. It's probably so simple, that I keep missing it.
 
  Here's what I'd like to accomplish:
 
  I want an image (aligned on the left side) with text beside it (aligned
  in the center). That sounds simple enough. But try as I may, I can't get
  it to work.
 
  Here's the code I've tried:
 
  *
 **
 
  ?php
  // lotsa stuff
 
  print brdiv align='left'img src='709-2585.jpg' width='120'
  height='120' alt=' '//a/divdiv
  align='center'{$_SESSION['desc']}/divbr;
 
  // more stuff
  ?
 
  *
 **
 
  What it displays:
 
  The pix is on the left where it should be, but the text isn't centered,
  but hangs either just underneath the pix. I've seen many sites with this
  layout. Perhaps they've separated the image/text. But I can't figure out
  how they did it.
 
  Any ideas?
 
  Will greatly appreciate some suggestions, and at this point,
  hand-slapping for missing the obvious:
 
  Tia, Andre

-- 
Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the Holy Souls in Purgatory.

May God bless you abundantly in His love!
For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Annoying display problem

2002-05-23 Thread David Freeman


  I want an image (aligned on the left side) with text beside 
  it (aligned in the center). That sounds simple enough. But try as I
may, I 
  can't get it to work.

  *
  print brdiv align='left'img src='709-2585.jpg' width='120' 
  height='120' alt=' '//a/divdiv 
  align='center'{$_SESSION['desc']}/divbr;
  *

  The pix is on the left where it should be, but the text 
  isn't centered, but hangs either just underneath the pix. I've seen
many sites 
  with this layout. Perhaps they've separated the image/text. But I
can't figure 
  out how they did it.

Wrapping something in a div will often get you an implied br
depending on the circumstances.  If you want text centred beside an
image that's not the most obvious solution is probably a table.
However, you might also try this (which is completely untested but may
do what you want...)

div align=center
  img src=image.jpg width=120 height=120 alt= align=left
  some text here, whatever...
/div

I tend to think that centering is over-used in many web pages so I don't
often mix things like this but it may well produce the behaviour you're
looking for.

CYA, Dave



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Annoying display problem

2002-05-23 Thread Andre Dubuc

Thanks Dave,

I tried that one, and the results were interesting. I reverted to the 
table method (I should have thought of it earlier, seeing that I had just 
used it in the lines just before [go figure!], but my mind was too frazzled 
to see it.

Now I've got the text sitting nicely beside the pix, but no matter what I try 
(i.e. td cellpadding=5 or whatever, the text butts right to the left 
margin, and won't format nicely -- it looks, in three words ugly and 
unprofessional. It offends my typsetting days!

Is there any way I can set the margins for the test, in particular, the left 
margin?

Code is now:

print brtd bgcolor='#ACE'table border=0td align='left'
td cellpadding='5'img src='709-2585.jpg' width='120'
height='120' alt=' '//a/td
td bgcolor='#ACE'td cellpadding='5'{$_SESSION['desc']}/td
/table;

Any ideas?
Tia, 
pAndre

On Thursday 23 May 2002 07:43 pm, you wrote:
   I want an image (aligned on the left side) with text beside
   it (aligned in the center). That sounds simple enough. But try as I

 may, I

   can't get it to work.
  
   *
   print brdiv align='left'img src='709-2585.jpg' width='120'
   height='120' alt=' '//a/divdiv
   align='center'{$_SESSION['desc']}/divbr;
   *
  
   The pix is on the left where it should be, but the text
   isn't centered, but hangs either just underneath the pix. I've seen

 many sites

   with this layout. Perhaps they've separated the image/text. But I

 can't figure

   out how they did it.

 Wrapping something in a div will often get you an implied br
 depending on the circumstances.  If you want text centred beside an
 image that's not the most obvious solution is probably a table.
 However, you might also try this (which is completely untested but may
 do what you want...)

 div align=center
   img src=image.jpg width=120 height=120 alt= align=left
   some text here, whatever...
 /div

 I tend to think that centering is over-used in many web pages so I don't
 often mix things like this but it may well produce the behaviour you're
 looking for.

 CYA, Dave

-- 
Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the Holy Souls in Purgatory.

May God bless you abundantly in His love!
For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Annoying display problem

2002-05-23 Thread David Freeman


  Now I've got the text sitting nicely beside the pix, but no 
  matter what I try (i.e. td cellpadding=5 or whatever, 
  the text butts right to the left margin,

First option is to insert cellpadding or cellspacing in your table tag
- that's where it get's set for the whole table.  A possible solution
could include using hspace=10 in your image tag (don't know if that
would be swallowed up in the table layout though).  Another option would
be to use styles - define a style for putting padding around something
and then use that style for your test (or probably your image for that
matter).

CYA, Dave



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Annoying display problem

2002-05-23 Thread Andre Dubuc

Hi Dave,

Well, I sort of solved it by adding:

tdnbsp;nbsp;/td

in a few judicious places. Renders well in Konqueror, Mozilla, and Galeon. 
Btw, I've been using CSS, and thought of doing it there, but it's a lot of 
trouble for only one table.

Thanks,
Andre

On Thursday 23 May 2002 11:00 pm, you wrote:
   Now I've got the text sitting nicely beside the pix, but no
   matter what I try (i.e. td cellpadding=5 or whatever,
   the text butts right to the left margin,

 First option is to insert cellpadding or cellspacing in your table tag
 - that's where it get's set for the whole table.  A possible solution
 could include using hspace=10 in your image tag (don't know if that
 would be swallowed up in the table layout though).  Another option would
 be to use styles - define a style for putting padding around something
 and then use that style for your test (or probably your image for that
 matter).

 CYA, Dave

-- 
Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the Holy Souls in Purgatory.

May God bless you abundantly in His love!
For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php