Jump to content


Photo

justify???? why wont it work, any help please


  • Please log in to reply
3 replies to this topic

#1 spires

spires
  • Members
  • PipPipPip
  • Advanced Member
  • 492 posts

Posted 07 July 2006 - 05:32 PM

Hi everyone.

I'm trying to text out of my database and diplay it. Simple? or so it would seam.

I can display the txt in the right position but i can not get it to justify!
Has anyone else had this problem?
I've tryed the 'justify tag inside both the TD and a DIV, none seam to work.
left, center and right all work fine, but i really need it to be justify.

Any help please.
http://www.spirestes...m/feng/feng.php

Heres the code

<table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="202" class="title2"><div align="justify"><?php echo $row['title']; ?></div></td>
                        <td rowspan="2">&nbsp;</td>
                        <td width="202" rowspan="2" valign="top">

<center>
<table width="184"  border="0" cellspacing="0" cellpadding="0">
                              <tr>
                              <td align="center"><img src="JPG/photos/ying-yang.jpg" width="183" height="183"></td>
                              </tr>
                            </table>
</center>
<br>
<div align="justify"><?php echo $row['col2']; ?></div>

 
</td>
                        <td width="4" rowspan="2">&nbsp;</td>
                     </tr>
                      <tr>
                       <td width="202" valign="top"><div align="justify"><?php echo $row['col1']; ?></div></td>
                      </tr>
                  </table>

Thanks  ???
How to make over $600 a day from AdSense? Discover EXACTLY how he does it in these videos:
http://www.adsense-online.com

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 07 July 2006 - 05:35 PM

To justify text you'll have to use the style text-align with the attribute justify.
You can accomplish this in the HTML tag:
<div style="text-align:justify">.. your text here </div>
You can also create an entry in the heading of your page or in a separate CSS file:
<style type="text/css">
DIV.block {text-align:justify}
... your other stiles here
</style>

With this code you create a class block that can be used by the tag <div>
<div class="block">.. your text here </div> will have the same effect as <div style="text-align:justify">.. your text here </div>
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 spires

spires
  • Members
  • PipPipPip
  • Advanced Member
  • 492 posts

Posted 07 July 2006 - 05:43 PM

Hi, thanks for your help.

but its still not working?

<div style="text-align:justify"><?php echo $row['title']; ?></div>

and

<div class="block"><?php echo $row['col2']; ?></div>

any other ideas please?  :D
How to make over $600 a day from AdSense? Discover EXACTLY how he does it in these videos:
http://www.adsense-online.com

#4 nogray

nogray
  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 07 July 2006 - 08:03 PM

This is more of an HTML issue, so if you can post the HTML output of the script rather then the PHP code.

like <div>text and more text</div>

for the text to be justified, it has to be longer then one line (with no line breaks <br />) or it will look normal

NoGray.com





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users