vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Fixed width last post table cell (https://vborg.vbsupport.ru/showthread.php?t=215233)

squishi 06-03-2009 05:46 AM

Fixed width last post table cell
 
1 Attachment(s)
I am unable to assign a fixed width to the table cells that contain the last post info.

I've already tried to give both the table cell (td) in the first row and all other rows a certain css attribute ("style='width:200px'").
When the page is loaded, those cells collapse to the width that is determined by their text content.
How do I expand those cells so that they all have the same width?

Dismounted 06-03-2009 06:17 AM

Just modify the header row to have a static width. Also, try using just the width attribute (i.e. not using a style attribute with CSS).

squishi 06-04-2009 03:43 AM

I have a fairly good understanding of html. I've tried doing what you said (mentioned it in the original post already), but it did not work.
So I guess I must be overlooking something.

Here is the template contents that control the width of the header row:
Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
        <tr align="center">
          <td class="thead" width="100%" align="$stylevar[left]">

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
                        <if condition="$show['forumdescription']"><span class="smallfont">- $forum[description]</span></if>

          </td>

          <td class="thead" width="175">$vbphrase[last_post]</td>

          <td class="thead">$vbphrase[posts]</td>
          <if condition="$vboptions['showmoderatorcolumn']">
          <td class="thead">$vbphrase[moderator]</td>
          </if>
        </tr>
</thead>

The width of 175 is added to the last post section in the table's header row, but it is not applied in the browser. Adding a css style instead of the width attribute does not work, either.

The only reason that I can think of is the width of 100% in the preceding table cell?

Lynne 06-04-2009 03:52 AM

Check vboptions > forum display > last thread title max chars and set that smaller. If you have it too long, it will push that table cell width out no matter what you have it set to.

squishi 06-04-2009 03:26 PM

But table cells that are smaller than the 175 px are not expanded!

Lynne 06-04-2009 04:12 PM

They are in that particular table. You separated the tables. When you do that, what happens in one table will no effect the other table. Nothing you can do about it if you are going to keep the tables separated.

squishi 06-04-2009 04:47 PM

I know the tables are separated.
But if I add the width to all the table cells, they should expand.
Anybody know the reason why they don't do that?

Lynne 06-04-2009 04:59 PM

How about a link to your page so we can see what is going on? and a test account if needed.

And if you have another table cell with a width in there, it could be conflicting with this one and that is the problem you are seeing.

squishi 06-07-2009 04:00 PM

**** link removed ****

The width of course depends on the latest post in the forum.
Both the table header and the last post table cell itself have a width attribute of 220.

Could it be all the "white-space:nowrap" stuff that collapses the table cell?

Lynne 06-07-2009 04:51 PM

Have you tried setting it to something bigger like 250? What do you have vboptions > forum listings options > last thread title max chars


All times are GMT. The time now is 02:44 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.02473 seconds
  • Memory Usage 1,731KB
  • 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)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