vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Creating a Table with HTML: blank space problem (https://vborg.vbsupport.ru/showthread.php?t=223462)

RedKnight 09-17-2009 07:18 PM

Creating a Table with HTML: blank space problem
 
I have been experimenting with the use of tables in vBulletin and feel that the format, when coverted to BBCode, will be of great value in displaying various information. Unfortunately when I create a table and inexplicable white space is always displayed above the table, and appears that the larger the table the larger the white space. Does anyone know of a solution to this issue? I have include the basic table coding for reference.

Code:

<table border=1 cellpadding=5 width=100%>
<tr>
        <th>Column 1</th>
        <th>Column 2</th>
        <th>Column 3</th>
</tr>
<tr>
        <td>Item 1</td>
        <td>Item 2</td>
        <td>Item 3</td>
</tr>
<tr>
        <td>Item A</td>
        <td>Item B</td>
        <td>Item C</td>
</tr>
</table>


Digital Jedi 09-17-2009 07:38 PM

Could you post a screen shot of what the white space looks like?

RedKnight 09-17-2009 08:01 PM

1 Attachment(s)
Quote:

Originally Posted by Digital Jedi (Post 1886601)
Could you post a screen shot of what the white space looks like?

I guess... but it is just, well blank. Let me see what I can do.

There it is, I've attached a quick screenshot. I've upped the columns to 5 in the attached example, because it appears that the space gets longer the larger the table is. It appeats that the non-coded space is being displayed before the table for some reason.

Code:

<table border=1 cellpadding=5 width=100%>
<tr>
        <th>Column 1</th>
        <th>Column 2</th>
        <th>Column 3</th>
        <th>Column 4</th>
        <th>Column 5</th>
</tr>
<tr>
        <td>Item 1</td>
        <td>Item 2</td>
        <td>Item 3</td>
        <td>Item 4</td>
        <td>Item 5</td>
</tr>
<tr>
        <td>Item A</td>
        <td>Item B</td>
        <td>Item C</td>
        <td>Item D</td>
        <td>Item E</td>
</tr>
</table>


Lynne 09-18-2009 12:59 AM

Check the page source of the post and see what is going on with the html in there.

Digital Jedi 09-18-2009 04:59 AM

This may seem trivial, but have you tried putting the quotation marks in the table tag where they should be?

RedKnight 09-18-2009 03:30 PM

Quote:

Originally Posted by Digital Jedi (Post 1886804)
This may seem trivial, but have you tried putting the quotation marks in the table tag where they should be?

Although documentation does suggest the use of with or without quotation marks I did try both ways with the same result.

Now, with some tinkering I have been able to confirm that for some unknown reason the what is displaying is all non-coded blank spaces before the table, so using the code as:
Code:

<table border=1 cellpadding=5 width=100%><tr><th>Column 1</th><th>Column 2</th><th>Column 3</th><th>Column 4</th><th>Column 5</th></tr><tr><td>Item 1</td><td>Item 2</td><td>Item 3</td><td>Item 4</td><td>Item 5</td></tr><tr><td>Item A</td><td>Item B</td><td>Item C</td><td>Item D</td><td>Item E</td></tr></table>
eliminates all the blank space, but does produce a coding nightmare. There must be something that I am missing that is having all the non-coded sections included for some reason.

Digital Jedi 09-18-2009 06:36 PM

Quote:

Originally Posted by RedKnight (Post 1887036)
Although documentation does suggest the use of with or without quotation marks I did try both ways with the same result.

Now, with some tinkering I have been able to confirm that for some unknown reason the what is displaying is all non-coded blank spaces before the table, so using the code as:
Code:

<table border=1 cellpadding=5 width=100%><tr><th>Column 1</th><th>Column 2</th><th>Column 3</th><th>Column 4</th><th>Column 5</th></tr><tr><td>Item 1</td><td>Item 2</td><td>Item 3</td><td>Item 4</td><td>Item 5</td></tr><tr><td>Item A</td><td>Item B</td><td>Item C</td><td>Item D</td><td>Item E</td></tr></table>
eliminates all the blank space, but does produce a coding nightmare. There must be something that I am missing that is having all the non-coded sections included for some reason.

With something like that, I would run the Source Code through the vaildator and see if there are any errors and tackle them from the top down. Since this is on your board, you could have an unrelated code error creating the issue with the post.

--------------- Added [DATE]1253302743[/DATE] at [TIME]1253302743[/TIME] ---------------

Quote:

Originally Posted by RedKnight (Post 1887036)
Although documentation does suggest the use of with or without quotation marks I did try both ways with the same result.

Now, with some tinkering I have been able to confirm that for some unknown reason the what is displaying is all non-coded blank spaces before the table, so using the code as:
Code:

<table border=1 cellpadding=5 width=100%><tr><th>Column 1</th><th>Column 2</th><th>Column 3</th><th>Column 4</th><th>Column 5</th></tr><tr><td>Item 1</td><td>Item 2</td><td>Item 3</td><td>Item 4</td><td>Item 5</td></tr><tr><td>Item A</td><td>Item B</td><td>Item C</td><td>Item D</td><td>Item E</td></tr></table>
eliminates all the blank space, but does produce a coding nightmare. There must be something that I am missing that is having all the non-coded sections included for some reason.

Wait, I just realized something. Quick question. You say this is BBCode, right? In what manner are you presenting tables as BBCode?

RedKnight 09-18-2009 09:04 PM

Quote:

Originally Posted by Digital Jedi (Post 1887146)
With something like that, I would run the Source Code through the vaildator and see if there are any errors and tackle them from the top down. Since this is on your board, you could have an unrelated code error creating the issue with the post.

--------------- Added [DATE]1253302743[/DATE] at [TIME]1253302743[/TIME] ---------------


Wait, I just realized something. Quick question. You say this is BBCode, right? In what manner are you presenting tables as BBCode?

Right now the experimentation is strictly HTML. I have created a simple BBCode for it, but it is not relevant at this time; it does the same thing.


As for any "validator", I could try that but this is the only place such a problem occurs.

Digital Jedi 09-18-2009 09:47 PM

Quote:

Originally Posted by RedKnight (Post 1887224)
Right now the experimentation is strictly HTML. I have created a simple BBCode for it, but it is not relevant at this time; it does the same thing.


As for any "validator", I could try that but this is the only place such a problem occurs.

That is most likely why your having the problem. All of your line breaks in code will be converted to line breaks once parsed inside of the post message area. The only way around that, that I know if, is to do the straight line code as you mentioned.

There are a number of modifications here on the site that attempt BBCode Tables in various ways. You might want to take a look at them, if at the very least just to get some ideas.

RedKnight 09-18-2009 10:15 PM

Quote:

Originally Posted by Digital Jedi (Post 1887245)
That is most likely why your having the problem. All of your line breaks in code will be converted to line breaks once parsed inside of the post message area. The only way around that, that I know if, is to do the straight line code as you mentioned.

There are a number of modifications here on the site that attempt BBCode Tables in various ways. You might want to take a look at them, if at the very least just to get some ideas.

If that's the case, shouldn't the HTML work?


All times are GMT. The time now is 04:58 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.01153 seconds
  • Memory Usage 1,758KB
  • 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
  • (5)bbcode_code_printable
  • (7)bbcode_quote_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
  • (10)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