Jump to content


Automatic Row Span


4 replies to this topic

#1 Samiwerty

    Young Padawan

  • Members
  • Pip
  • 135 posts

Posted 05 May 2005 - 03:24 PM

Sorry about posting so much, but there is something like 4 hours before my last topic ;) I have a new problem...

Is there a way to make text automatically span rows when the first row is full. like

BLEE BLEE BLEE
BLAA BLAA BLAA
BLO BLO BLO

I know this is very n00bish question but i hope u can help ^_^

#2 MaRmAR

    Young Padawan

  • Members
  • Pip
  • 18 posts
  • Location:Slovakia

Posted 06 May 2005 - 02:46 AM

One thing is to do it with tables:

<table>
<tr>
  <td>BLEE</td><td>BLEE</td><td>BLEE</td>
</tr>
<tr>
  <td>BLAA</td><td>BLAA</td><td>BLAA</td>
</tr>
<tr>
  <td>BLUU</td><td>BLUU</td><td>BLUU</td>
</tr>
</table>

Another thing is to do it using CSS:

<div style="float:left; width:800px; height:20px; border:1px dashed red;">
  <div style="float:left;">BLEE</div>
  <div style="float:left;">BLEE</div>
  <div style="float:left;">BLEE</div>
</div>
<div style="float:left; width:800px; height:20px; border:1px dashed lime; margin-top:2px;">
  <div style="float:left;">BLAA</div>
  <div style="float:left;">BLAA</div>
  <div style="float:left;">BLAA</div>
</div>
<div style="float:left; width:800px; height:20px; border:1px dashed lime; margin-top:2px;">
  <div style="float:left;">BLUU</div>
  <div style="float:left;">BLUU</div>
  <div style="float:left;">BLUU</div>
</div>


#3 winuu

    Young Padawan

  • Members
  • Pip
  • 13 posts
  • Location:Finland
  • Interests:Drawing, designing graphics, programming, composing music.

Posted 06 May 2005 - 05:52 AM

And one more thing is to do it with PHP:

<?php
$text = "BLEE BLEE BLEE BLAA BLAA BLAA BLO BLO BLO";
$wrapped_text = wordwrap($text, 20, "<br>");
echo $wrapped_text;
?>

More info: wordwrap()

:rolleyes:

#4 Samiwerty

    Young Padawan

  • Members
  • Pip
  • 135 posts

Posted 06 May 2005 - 06:14 AM

Woo... Thanks guys. Gotta try those :rolleyes: And MaRmAR thanks for that CSS tip.. Gonne use that style :unsure:

#5 MaRmAR

    Young Padawan

  • Members
  • Pip
  • 18 posts
  • Location:Slovakia

Posted 06 May 2005 - 07:20 AM

No problem Samiwerty. :rolleyes:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users