Click to See Complete Forum and Search --> : html - displaying indented text
TheLinuxDuck
10-11-2000, 04:13 PM
Is there an easy way for me to post indented code examples in html format, without having to use a gazillion 's?
That just seems so ugly. If all else fails, I can just use a <img src=tab.gif> but I sure would hate to have to doing something so.. jerryrigged... http://www.linuxnewbie.org/ubb/smile.gif
Anybody have a clue? I sure don't!!! http://www.linuxnewbie.org/ubb/smile.gif
------------------
TheLinuxDuck
Wait... that's a penguin?!?!?
:wq
manual_overide
10-11-2000, 04:18 PM
I don't know. try the <pre> tag. That might work. I haven't had a use for it yet.
klamath
10-11-2000, 04:24 PM
You might want to check if CSS includes something on that. I vaguely remember that it might.
------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
BrianDrozd
10-11-2000, 04:34 PM
In CSS there is an option called text-indent. If you set up the following
P {text-indent: 3em}
Then the first line of all paragraphs (at least thost that start with < P > ) are indented.
TheLinuxDuck
10-11-2000, 04:37 PM
Thanks for all your responses friends! <pre> did the trick for me. http://www.linuxnewbie.org/ubb/smile.gif
Now, I just need to figger out how to display characters like < and > in an html document. http://www.linuxnewbie.org/ubb/smile.gif
------------------
TheLinuxDuck
Wait... that's a penguin?!?!?
:wq
hswoolve
10-11-2000, 04:43 PM
use an ampersand and lt; ( & lt; ) to get the <.
use an ampersand and gt; ( & gt; ) to get the >.
[edited to get rid of ubb auto substitutions]
[This message has been edited by hswoolve (edited 11 October 2000).]
TheLinuxDuck
10-11-2000, 04:51 PM
Originally posted by hswoolve:
use an ampersand and lt; ( & lt; ) to get the <. use an ampersand and gt; ( & gt; ) to get the >.
Muchos gracias! (even bad at spelling spanish.. ::sigh: http://www.linuxnewbie.org/ubb/smile.gif
My mom was whistling the 'bad news bears' theme song earlier and now it's running through my head...
------------------
TheLinuxDuck
Wait... that's a penguin?!?!?
:wq
manual_overide
10-11-2000, 04:56 PM
Yeah, that does work. See http://manualoveride.darktech.org/files/stuff.html for an example
ph34r
10-12-2000, 02:34 PM
A nice indent can be done using definition lists
<dl>
<dt>Def term here
<dd>Definition here
<dt> next term
<dd> next def
</dl>
The definition is indented under the term. So, you can use a non-breaking space for the term, and the rest of the stuff can be your indent. Or, you can use a table with cell padding or a table within a table and some align properties.
Lots of ways to do it.
[This message has been edited by ph34r (edited 12 October 2000).]
Sweede
10-12-2000, 03:55 PM
if you have php installed, you can use php's show_source() function to show all the fancy indents and whatnot of anything.
Dru Lee Parsec
10-14-2000, 11:04 PM
I do it this way:
<TABLE WIDTH="600">
<TR>
<!-- the next line is your indent -->
<TD WIDTH="30"> </TD>
<TD>Put all your text here and don't even worry about word wrap because the table width will take care of that for you</TD>
</TR>
</TABLE>
[This message has been edited by Dru Lee Parsec (edited 14 October 2000).]