Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-21-2010, 11:59 AM
AfterWorldForum AfterWorldForum is offline
 
Join Date: Dec 2008
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vB4 tables

Is there anyone who could offer a quick translation beteen an old vB 3.8.* table and how it should be made in vB4 now?

Take for example the table below. I have numerous pages generating exactly that kind of HTML code, and have looked for a short guide describing the table setup, but not found one so far.

Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<th class="tcat" colspan="10" align="center">Title</td>
</thead>
<tr>
<td width="35" class="alt1">foo</td>
<td width="20%" class="alt1">bar</td>
</tr></table>
How would the table look like in vB4? What div classes should I use, and in which order?


Thanks in advance
Reply With Quote
  #2  
Old 08-21-2010, 12:27 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

CSS doesn't handle things the same way tables do. You won't get things to line up right in the columns. I had to use a table, tr and td with a hack of mine in vb 4 since I couldn't get it to do what I needed with CSS.
Reply With Quote
  #3  
Old 08-21-2010, 12:43 PM
AfterWorldForum AfterWorldForum is offline
 
Join Date: Dec 2008
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo View Post
CSS doesn't handle things the same way tables do. You won't get things to line up right in the columns. I had to use a table, tr and td with a hack of mine in vb 4 since I couldn't get it to do what I needed with CSS.
Hey again Boofo (You helped me with this before, advising the "restore" approach). And I did come across a thread started by you involving tables.

For better or for worse, CSS now seems to be the way to handle things within vB4, and rather than having to resort to duct-tape approaches, I would actually much prefer IB (or perhaps someone else) to offer some guide or article. In the meantime, I'm hoping I'll at least get some feedback. It'll be a pain in the you-know-what converting the existing tables on my site, but if I would know how to go at it, I could at least ensure that future projects would work the way they are supposed to work.

Thanks again for your reply
Reply With Quote
  #4  
Old 08-21-2010, 12:56 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Like I said in the other thread, CSS won't allow you to line up things in columns like TD did. That is one major drawback to using CSS for everything. There is no way around it, trust me.
Reply With Quote
  #5  
Old 08-21-2010, 02:19 PM
Eric's Avatar
Eric Eric is offline
 
Join Date: May 2006
Location: Kentucky
Posts: 792
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vBulletin 4 still uses tables in some places, btw Tables aren't all that bad, if used properly.
Reply With Quote
  #6  
Old 08-22-2010, 12:00 AM
mmoore5553 mmoore5553 is offline
 
Join Date: Aug 2008
Posts: 530
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I agree tables are not too bad and second is correct they are still used . Also you can use table in css. I have seen it all the time.

I do not know exactly what you are wanting to use or a live link ..so hard to help with just code. I would have to know more info or some kind of picture.
Reply With Quote
  #7  
Old 08-22-2010, 04:22 PM
AfterWorldForum AfterWorldForum is offline
 
Join Date: Dec 2008
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for everyone's comments so far.

Quote:
Originally Posted by mmoore5553 View Post
I agree tables are not too bad and second is correct they are still used . Also you can use table in css. I have seen it all the time.

I do not know exactly what you are wanting to use or a live link ..so hard to help with just code. I would have to know more info or some kind of picture.
It's not that I am against tables. I absolutely couldn't live without them. I'm mostly confused that apparently IB/the vB team decided to change their ways, and then fail to update us on what they think we ough to use instead.

For the time being, I'll just use tables, but it would also be nice seeing some kind of guide explaining how vB thinks it ought to be handled now.

As for that I want, my first post has a very basic example. Nothing fancy, just a table with a header, a few rows and some columns.
Reply With Quote
  #8  
Old 08-22-2010, 07:51 PM
Eric's Avatar
Eric Eric is offline
 
Join Date: May 2006
Location: Kentucky
Posts: 792
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try:

HTML Code:
<table cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<thead>
<tr>
	<th class="blockhead" colspan="2" align="center">Title</th>
</tr>
</thead>
<tr>
	<td class="blockrow">foo</td>
	<td class="blockrow">bar</td>
</tr>
</table>
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:45 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.04096 seconds
  • Memory Usage 2,236KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete