PDA

View Full Version : vB4 tables


AfterWorldForum
21 Aug 2010, 12:59
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.


<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
21 Aug 2010, 13:27
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
21 Aug 2010, 13:43
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
21 Aug 2010, 13:56
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
21 Aug 2010, 15:19
vBulletin 4 still uses tables in some places, btw ;) Tables aren't all that bad, if used properly.

mmoore5553
22 Aug 2010, 01:00
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
22 Aug 2010, 17:22
Thanks for everyone's comments so far.

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
22 Aug 2010, 20:51
Try:


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