Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-17-2009, 07:18 PM
RedKnight RedKnight is offline
 
Join Date: Sep 2009
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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>
Reply With Quote
  #2  
Old 09-17-2009, 07:38 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could you post a screen shot of what the white space looks like?
Reply With Quote
  #3  
Old 09-17-2009, 08:01 PM
RedKnight RedKnight is offline
 
Join Date: Sep 2009
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
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>
Attached Images
File Type: jpg creating a table.jpg (23.6 KB, 0 views)
Reply With Quote
  #4  
Old 09-18-2009, 12:59 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check the page source of the post and see what is going on with the html in there.
Reply With Quote
  #5  
Old 09-18-2009, 04:59 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This may seem trivial, but have you tried putting the quotation marks in the table tag where they should be?
Reply With Quote
  #6  
Old 09-18-2009, 03:30 PM
RedKnight RedKnight is offline
 
Join Date: Sep 2009
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
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.
Reply With Quote
  #7  
Old 09-18-2009, 06:36 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RedKnight View Post
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 View Post
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?
Reply With Quote
  #8  
Old 09-18-2009, 09:04 PM
RedKnight RedKnight is offline
 
Join Date: Sep 2009
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
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.
Reply With Quote
  #9  
Old 09-18-2009, 09:47 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RedKnight View Post
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.
Reply With Quote
  #10  
Old 09-18-2009, 10:15 PM
RedKnight RedKnight is offline
 
Join Date: Sep 2009
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:40 PM.


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.07265 seconds
  • Memory Usage 2,290KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete