View Full Version : indentation
Lambneck
04-23-2008, 05:49 PM
Hello,
Is there a way to make an echo indented?
echo "<table>";
Andrew Johnson
04-23-2008, 05:58 PM
Just push tab after the first double quote (kind of hard in a browser though)
echo " <table>";
Lambneck
04-23-2008, 08:26 PM
didn't work :(
how about centering?
is there a way to center it?
i tried the following but no luck:
echo "<center><table></table></center>";
Andrew Johnson
04-23-2008, 08:40 PM
What are you trying to do? Indent your code or indent the text on the user sees?
Lambneck
04-23-2008, 08:47 PM
Im trying to indent what the user sees.
Andrew Johnson
04-23-2008, 08:48 PM
Oh well then next time say that...
Use 's to create non-brekaing spaces
Weeeeee
Lambneck
04-23-2008, 10:43 PM
ok but how would you indent this!:
echo "<table>"
echo "<tr><td><br><font size=\"2\">";
echo (nl2br($row['col_5']));
echo "</font></td></tr>";
echo "</table>";
harbingerOTV
04-24-2008, 05:16 AM
Are you indenting the output like:
<table>
<tr><td><br><font size="2">
whatever</font></td></tr>
</table>
or output like:
______________
whatever
______________
?
if the second you could do:
echo "<table><tr><td><br><font size='2'> ".(nl2br($row['col_5']))."</font></td></tr></table>";
or:
echo "<table><tr><td class='ti'><br><font size='2'>".(nl2br($row['col_5']))."</font></td></tr></table>";
css:
.ti { text-indent: 10px; }
Lambneck
04-24-2008, 03:39 PM
hello,
I tried using:
echo "<tr><td><br><font size='2'> ".(nl2br($row['col_5']))."</font></td></tr>";
but it only indents the first line of the paragraph in the output.
Im trying to get everything in the output indented.
(also didn't get any indent at all using the css)
Andrew Johnson
04-24-2008, 04:10 PM
You're looking for padding, indenting is something else...
Lambneck
04-24-2008, 04:40 PM
yeah but I don't want padding between the table rows...
is there a way to pad just the left and right sides or even just the left side of the table?
rafiki
04-24-2008, 04:43 PM
this is a css question.
and just the left side of the table?
.tablename{
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 10px;
}
Lambneck
04-25-2008, 09:32 PM
thanks rafiki
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.