Home arrow Forum Tables that don't stretch
  Welcome, Guest. Please login or register.
Did you miss your activation email?
August 30, 2008, 02:03:44 AM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  FAQ's
| | |-+  Tables that don't stretch
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Tables that don't stretch  (Read 1342 times)
tony millan
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 16


View Profile
Tables that don't stretch
« on: November 07, 2006, 01:07:36 PM »

I am working on some type of a CBE module but need help with my tables.....

I have the CBE Buddy Table located in the middle right side, and below it, I have a Box where users can add any type of Html codes. 

When there are no html codes underneath the Buddy table, everything looks good, but whenever my users add big images or so, the Buddy table stretches, to match the size of the Html Box. 

This is how it looks before a big image code is added underneath:




This is how it looks when a long code or image is added under the Buddy Table (tab).



How can I lock the Buddy Table's size, so that it doesn't stretch?  This is the code i'm currently using for my buddy table:

Code:
<table class="profilebox1" width=500 border=2 bordercolor=gray cellspacing=0 cellpadding=2>
<tr>
<td><p><span style="font-weight: bold;">My Buddies</span></p>
<p><?php include('components/com_comprofiler/enhanced/buddy/buddy.php'); ?></p>
</td>
    </tr>
  </table>
  <br />

I hope I posted this in the correct forum.
Logged
-Wolverine
Developer
Joomla Guru
*****

Karma: +374/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Tables that don't stretch
« Reply #1 on: November 08, 2006, 09:10:26 AM »

the easiest way would be to add a class or id to your table.

Code:
<table class="profilebox1" width=500 border=2 bordercolor=gray cellspacing=0 cellpadding=2 class="buddy">


Then in your CSS template define a width for that class
Code:
.buddy{width:500px;}

That should work.  By the way, setting a width for the table element is not good practice.  I believe it won't validate as xhtml.  Set the width using css.
« Last Edit: November 08, 2006, 09:15:46 AM by -Wolverine » Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
tony millan
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 16


View Profile
Re: Tables that don't stretch
« Reply #2 on: November 09, 2006, 10:09:31 AM »

Thanks!!!!  Cool
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal.
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use