vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Programming Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=188)
-   -   [TIP] Indent Table Elements (https://vborg.vbsupport.ru/showthread.php?t=84528)

Tony G 10-01-2002 09:30 AM

I can live with both, but I find it a little easier. It don't really matter anyway much to me. :)

imported_plattopus 10-01-2002 11:53 AM

Yeah it's usually easier... especially when you're dealing with a lot of nested tables. If you see a big jump in indents, that suggests you've either missed a few closing tags, or forgotten them.

Example:

Code:

<table>
<tr>
<td valign="top">
This is some text
</td>
<td>
<table width="100%">
<tr>
<td>
Some more text
</td>
</tr>
<tr>
<td colspan="2">
This is yet more text
</td>
</tr>
</table>

It could be hard to notice errors in code like this (but far more complex, I only used this as an example)... this is much easier:

Code:

<table>
  <tr>
    <td valign="top">
      This is some text
    </td>
    <td>
      <table width="100%">
        <tr>
          <td>
            Some more text
    </td>
  </tr>
  <tr>
    <td colspan="2">
      This is yet more text
    </td>
  </tr>
</table>

You can see the big jump in space between the text and it's ending TD tag.

Tony G 10-01-2002 12:11 PM

I agree, I prefer the second way but I don't mind. I mean I can still spot errors without the indents but it could be harder. :)

Christoff 10-18-2002 01:25 PM

Plattopus: upload your files in ASCII mode and there will be no problem with character coding ;)
I often edit files on windows and after upload there is no diffrence from the one made on BSD :)

imported_plattopus 10-19-2002 06:37 AM

There is a difference, it might just be luck that both of the programs you used are configured similarly.

mashby 10-23-2002 10:01 AM

Good points plattopus. My text editor intreprets the Tab and then inserts the number of spaces that you've set.

For those of you editing in multiple OS's, plattopus' idea about using spaces is a good one.

Either way, indention can help. :)

imported_plattopus 10-24-2002 03:30 AM

I've set my text editor (Edit Plus 2) to do the same thing... that way, I can use the TAB key (which is far more convenient than pressing space 4 times) and it will insert 4 non-breaking spaces instead of a tabspace.

But the point is, indentation is a MUST for readability.

mashby 10-24-2002 04:35 PM

That's the same text editor I use! :D


All times are GMT. The time now is 11:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01036 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete