vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   vB4 tables (https://vborg.vbsupport.ru/showthread.php?t=249055)

AfterWorldForum 08-21-2010 11:59 AM

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 :)

Boofo 08-21-2010 12:27 PM

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.

AfterWorldForum 08-21-2010 12:43 PM

Quote:

Originally Posted by Boofo (Post 2087346)
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 :)

Boofo 08-21-2010 12:56 PM

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. ;)

Eric 08-21-2010 02:19 PM

vBulletin 4 still uses tables in some places, btw ;) Tables aren't all that bad, if used properly.

mmoore5553 08-22-2010 12:00 AM

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.

AfterWorldForum 08-22-2010 04:22 PM

Thanks for everyone's comments so far.

Quote:

Originally Posted by mmoore5553 (Post 2087579)
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.

Eric 08-22-2010 07:51 PM

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>



All times are GMT. The time now is 12:22 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.01813 seconds
  • Memory Usage 1,733KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete