Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » HTML Tables


HTML Tables

Reply
  #1 (permalink)  
Old 05-28-06, 11:12 AM
Hunter Hunter is offline
Newbie Coder
 
Join Date: Dec 2005
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
HTML Tables

Hey, I need some help with something im creating. Ive got 3 tables, that are expandable tables so when theirs more info in them they expand. I have one for the left block, one for a middle block and one for a right block. But they are all showing on differnet rows. The tables for the left/right are 20% width and the middle is 60%.

Heres my code -
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<table width="20%" height="166" border="1">
  <tr>
    <td width="13%" height="21"> </td>
    <td width="74%"><div align="center">TITLE</div></td>
    <td width="13%"> </td>
  </tr>
  <tr>
    <td height="116"> </td>
    <td valign="top">CONTENT CONTENT CONTENT </td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
    <td> </td>
  </tr>
</table>
<table width="60%" height="162" border="1">
  <tr>
    <td width="6%" height="21"> </td>
    <td width="88%"><div align="center">TITLE</div></td>
    <td width="6%"> </td>
  </tr>
  <tr>
    <td height="112"> </td>
    <td valign="top">CONTENT CONTENT CONTENT </td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
    <td> </td>
  </tr>
</table>
<table width="20%" height="166" border="1">
  <tr>
    <td width="13%" height="21"> </td>
    <td width="74%"><div align="center">TITLE</div></td>
    <td width="13%"> </td>
  </tr>
  <tr>
    <td height="116"> </td>
    <td valign="top">CONTENT CONTENT CONTENT </td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
    <td> </td>
  </tr>
</table>
</body>
</html>
And if you need it, heres a preview on the web -http://www.clarkysite.co.uk/test.html

Can someone help me please?

Regards,
Hunter

Can someone help me please?

Regards,
Hunter
Reply With Quote
  #2 (permalink)  
Old 05-28-06, 11:41 AM
alane alane is offline
Newbie Coder
 
Join Date: Jul 2005
Posts: 71
Thanks: 6
Thanked 0 Times in 0 Posts
I don't think you can have three tables in you form you have all in the same line.

Why not have a single table with three columns? Left and right with a width of 19% and the centre with a width of 58%.

Not totaling 100% as you will need to leave provision for the borders.
Reply With Quote
  #3 (permalink)  
Old 05-28-06, 12:43 PM
Hunter Hunter is offline
Newbie Coder
 
Join Date: Dec 2005
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
Im not doing that, because its an expanding table. If it was three columns, then when the middle expands, the left and right would follow.

Please help somone?...
Reply With Quote
  #4 (permalink)  
Old 05-29-06, 05:20 AM
King Coder King Coder is offline
Community VIP
 
Join Date: Jan 2006
Posts: 703
Thanks: 0
Thanked 0 Times in 0 Posts
not going to happen the way you are doing it. You can either create a table with three columns, or nested tables....

Code:
<table>
  <tr>
    <td>
       <table>
       </table>
    </td>
    <td>
        <table>
        </table>
    </td>
    <td>
        <table>
        </table>
    </td>
   </tr>
</table>
__________________
my site
Reply With Quote
  #5 (permalink)  
Old 06-04-06, 04:05 PM
-tg -tg is offline
Newbie Coder
 
Join Date: Jun 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Why not do it in css/xhtml?

The xhtml code:
Code:
<div id="container">
	<div id="left"></div>
	<div id="middle"></div>
	<div id="right"></div>
</div>
The css code:
Code:
#container {
	width:100%;
}
#left {
	float:left;
	width:20%;
}
#middle {
	float:left;
	width:60%;
}
#right {
	float:left;
	width:20%;
}
That should do it
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html tutoral thefrtman HTML/XHTML/XML 5 04-27-09 10:25 AM
Classified Ads skipper23 Perl 3 11-22-05 02:22 AM
Need website design or HTML coding help? website_help HTML/XHTML/XML 0 05-26-05 12:07 PM
HTML tables from PHP/MySQL query MikeNL PHP 3 01-24-04 02:47 AM


All times are GMT -5. The time now is 08:54 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.