Tables not using 100% width of the tab

Discuss everything related to ApPHP Tabs. Any questions related to the ApPHP Tabs developing or using should be posted to this forum.

Moderators: alexandrleonenko, Milton

mrhahn
Newbie
Newbie
Posts: 6
Joined: Nov 11th, '10, 23:45

Tables not using 100% width of the tab

Postby mrhahn » Nov 18th, '11, 05:53

I regret if I missed this in the FAQ/Forums - you can let me know to RTFM :-)

I am struggling with using tables within the ApPHP Tabs v 3.0.1. The issue is that I am trying to use 100% of the width of the tab, and it seems to wrap the text after roughly 50% of the available space in the tab. Here is the example: http://vidimodo.com/testTab.php

Is there something I am doing wrong either in the CSS or in the tab configuration? Thanks for any guidance.


Here are my 2 files:
TAB FILE
-----------------------------------------------------------------------------------------------------
<?php
// This is for the template
require_once('include/template.class.php');
// Initialise template object
$objTemplate = new Template();
// SEO
$objTemplate->setTitle($objTemplate->site_name);
$objTemplate->setDescription("Daily Activity Page");
// CSS
$objTemplate->setStyle(array('1'));
#$objTemplate->setExtraStyle('p.example{color:red;}');

// Header HTML file
include($objTemplate->header_file);
include($objTemplate->sidebar_file);

echo '<h3><em><center>Hello</h3><BR>';


## +---------------------------------------------------------------------------+
## | 1. Creating & Calling: |
## +---------------------------------------------------------------------------+
## *** define a relative (virtual) path to tabs.class.php file
define ("TABS_DIR", "tabs/"); /* Ex.: "tabs/" */
## *** include Tabs class
require_once(TABS_DIR.'tabs.class.php');
## *** create Tabs object
$tabs = new Tabs();

## +---------------------------------------------------------------------------+
## | 2. General Settings: |
## +---------------------------------------------------------------------------+
## *** set unique numeric (integer-valued) identifier for Tabs
## *** (if you want to use several independently configured Tabs objects on single page)
$tabs->SetId(13);
## *** set style for Tabs
## *** "xp", "dark-pink", "light-green", "g-style", "grey" or your own style
$tabs->SetStyle("xp");
## *** set Tabs caption
##$tabs->SetCaption($dashboardBanner);
## *** show debug info - false|true
$tabs->Debug(false);
## *** choose mode of displaying child tabs - links|dropdown|tabs
$tabs->SetChildTabsType("dropdown");
## *** set form submission type: "get", "post" or "ajax"
$tabs->SetSubmissionType("get");
## *** set variables that used to get access to the page (like: my_page.php?act=34&id=56 etc.)
$tabs->SetHttpVars(array("username"));

## +---------------------------------------------------------------------------+
## | 3. Adding tabs: |
## +---------------------------------------------------------------------------+

$tabs->AddTab("TEST", "test4.php");

## +---------------------------------------------------------------------------+
## | 4. Display Settings: |
## +---------------------------------------------------------------------------+
## *** set container's width
## *** for example "200px" or "40%" or "auto" (default) - 650px
$tabs->SetWidth("675px");

## *** set container's height
## *** for example "200px" or "auto" (default)
// $tabs->SetHeight("500px");

## +---------------------------------------------------------------------------+
## | 5. Disabling Tabs: |
## +---------------------------------------------------------------------------+
/// $grandson2->Disable();

## +---------------------------------------------------------------------------+
## | 6. Choosing tabs which will be selected by default: |
## +---------------------------------------------------------------------------+
/// $tabs->SetDefaultTab($son);
/// $son->SetDefaultTab($grandson2);

## +---------------------------------------------------------------------------+
## | 7. Draw Tabs: |
## +---------------------------------------------------------------------------+

$tabs->Display();



include($objTemplate->footer_file);


AND HERE IS THE FILE THE TAB REFES TO (TEST4.php)
_______________________________________________________________________________
<html>
<head>
<style type="text/css">
table,td,th
{
border:1px solid black;
}
table
{
width:100%;
}
th
{
height:50px;
}
</style>
</head>

<body>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Savings</th>
</tr>
<tr>
<td>Peter Excelon Luis Escelon</td>
<td>Griffin Jr Sr Dr MD Super Geek</td>
<td>$10000000000000000</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
<td>$1500000000000000000</td>
</tr>
<tr>
<td>Joe Bob Billy Nick</td>
<td>Swanson Jr</td>
<td>$3000000000000000</td>
</tr>
<tr>
<td>Cleveland</td>
<td>Brown</td>
<td>$250</td>
</tr>
</table>
</body>
</html>

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Tables not using 100% width of the tab

Postby administrator » Nov 20th, '11, 09:16

Don't use

Code: Select all

<html>
<head>


tags inside your content of the tab

mrhahn
Newbie
Newbie
Posts: 6
Joined: Nov 11th, '10, 23:45

Re: Tables not using 100% width of the tab

Postby mrhahn » Nov 28th, '11, 06:47

Hi - thanks for the response.

I regret that I did remove the tags (See below), but still seems to be an issue - I also was thinking maybe it was something with my CSS, so I also created a simple page with the same table not within the tabs -

NO TABS: Just using table within the page --> http://www.vidimodo/test5.php:
<?php
//
// Vidimodo 2011
// This is the core functions related to all files that authenticate
// Inclides both the template system, as well as unique validations
//

// This is for the template
require_once('include/template.class.php');
// Initialise template object
$objTemplate = new Template();
// SEO
$objTemplate->setTitle($objTemplate->site_name);
$objTemplate->setDescription("This is the page's meta description.");
// CSS
$objTemplate->setStyle(array('1'));
#$objTemplate->setExtraStyle('p.example{color:red;}');

// Header HTML file
include($objTemplate->header_file);
include($objTemplate->sidebar_file);
//Complete of template functions

//
// COMPLETE OF CORE FUNCTIONS
//

?>
<!-- This is to close out the content div if not needed -->
</div>

<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Savings</th>
</tr>
<tr>
<td>Peter Excelon Luis Escelon</td>
<td>Griffin Jr Sr Dr MD Super Geek</td>
<td>$10000000000000000</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
<td>$1500000000000000000</td>
</tr>
<tr>
<td>Joe Bob Billy Nick</td>
<td>Swanson Jr</td>
<td>$3000000000000000</td>
</tr>
<tr>
<td>Cleveland</td>
<td>Brown</td>
<td>$250</td>
</tr>
</table>

<?
//
// END OF FILE
//
include($objTemplate->footer_file);
?>


AND HERE IS THE MODIFIED CONTENT FILE THAT IS USED IN http://www.vidimodo.com/testTab.php:


<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Savings</th>
</tr>
<tr>
<td>Peter Excelon Luis Escelon</td>
<td>Griffin Jr Sr Dr MD Super Geek</td>
<td>$10000000000000000</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
<td>$1500000000000000000</td>
</tr>
<tr>
<td>Joe Bob Billy Nick</td>
<td>Swanson Jr</td>
<td>$3000000000000000</td>
</tr>
<tr>
<td>Cleveland</td>
<td>Brown</td>
<td>$250</td>
</tr>
</table>


Thanks for any additional insight - I have not removed my CSS framework, but could do that next - I basically lifted the structure from http://imgiseverything.co.uk/articles/p ... templates/

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Tables not using 100% width of the tab

Postby administrator » Nov 28th, '11, 07:41

1. Please use [ code ] ... [ / code ] to show us any code, including HTML - else it doesn't readable.
2. Please define border=1 for your tables, so we could see where the border comes.

mrhahn
Newbie
Newbie
Posts: 6
Joined: Nov 11th, '10, 23:45

Re: Tables not using 100% width of the tab

Postby mrhahn » Nov 28th, '11, 13:35

Thanks -
Item 1: Sorry about that (and below is the block of code for the HTML used in both pages)
Item 2: OK, all set:
Using Tabs: --> http://vidimodo.com/testTab.php
No Tabs: --> http://vidimodo.com/test5.php

Code: Select all

<table border=1>
<tr><th>Firstname</th><th>Lastname</th><th>Savings</th></tr>
<tr><td>Peter Excelon Luis Escelon</td><td>Griffin Jr Sr Dr MD Super Geek</td><td>$10000000000000000</td></tr>
<tr><td>Lois</td><td>Griffin</td><td>$1500000000000000000</td></tr>
<tr><td>Joe Bob Billy Nick</td><td>Swanson Jr</td><td>$3000000000000000</td></tr>
<tr><td>Cleveland</td><td>Brown</td><td>$250</td></tr>
</table>

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Tables not using 100% width of the tab

Postby administrator » Nov 29th, '11, 09:08

Ok, it seems that they are same, isn't it?
Try to define

Code: Select all

<table border=1 width=100%>

whitecrow4
Newbie
Newbie
Posts: 1
Joined: Jan 9th, '15, 17:01

Re: Tables not using 100% width of the tab

Postby whitecrow4 » Jan 9th, '15, 17:05

That didn't work. I'm having too much trouble getting this framework to work for me. I'm going to find another product.

Thanks for your help...
Pass your http://www.braindumps.net and a plus exams in first try by using our security plus certification passguide and www.usna.edu and best quality Jacksonville University


Return to “ApPHP Tabs”