WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > HTML & XHTML > Question regarding tables

Closed Thread
  Thread Tools Display Modes
Old 17th June 10, 11:21 AM   #1
aka.snowball
WLC Member
 
Join Date: Jun 2010
Posts: 11
Default Question regarding tables

Say that i have the following table. How can I do so that the three column takes up as much space as the other six?

In other words i want the three columns below(table cell 1, borttagit,tablecell3) to be the same width as the other six table cells.

How can this be done? I tried limiting the table width to 600px and then set each of those columns to 200 px but didnt work, the table expanded.

And if this is imposible to make in tables or <tbodys> how can i achieve this?

I would like to merge cells like you can in dreamweaver.

thanks



Code:
<table border="1" bordercolor="#FFCC00" style="background-color:#FFFFCC" width="600" cellpadding="3" cellspacing="3">
		<tr>
		<td>Table Cell</td>
		<td>Table Cell</td>
		<td>Table Cell</td>
		<td>Table Cell</td>
		<td>Table Cell</td>
		<td>Table Cell</td>
	</tr>
	<tr>
		<td style="width: 200px;">Table Cell1</td>
		<td style="width: 200px;">Borttagit</td>
		<td style="width: 200px;">Table Cell2</td>
	</tr>

	<tr>
		<td>Table Cell</td>
		<td>Table Cell</td>
		<td>Table Cell</td>
		<td>Table Cell</td>
		<td>Table Cell</td>
		<td>Table Cell</td>
	</tr>
</table>
aka.snowball is offline  
Old 17th June 10, 02:48 PM   #2
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
Default Re: Question regarding tables

use colspan="2" on the cells that need to span two columns
chrishirst is offline  
Old 5th July 10, 10:37 AM   #3
ascon
WLC Member
 
Join Date: Jul 2010
Posts: 2
Default Re: Question regarding tables

You should use % instead of pixels to allocate the size of the table cells. For cell size of 200 pixels each and total size is 600 pixels, You should use 33% size for each cell of the table.
<td size=33%>write your data<td>
__________________

To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
ascon is offline  
Old 27th August 10, 08:52 PM   #4
6degres
WLC Member
 
Join Date: Aug 2010
Posts: 19
Default Re: Question regarding tables

You could also force the table width to "600px" and use "33%" for each column. However, if you have non breaking strings in your columns, i'm not sure how the columns will react (will they get pushed ?). Anyhoot, assuming you dont have a non breaking string of >200px, this should work.
__________________
Danny
6degrés - Évoluez sur le 3W!

To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
6degres is offline  
Closed Thread


Thread Tools
Display Modes
Linear Mode Linear Mode

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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:00 AM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyright© 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.