Different Table Cell Size

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
szms
Forum Contributor
Posts: 101
Joined: Thu Jun 26, 2003 12:23 pm

Different Table Cell Size

Post by szms »

How do I change the cell size in the same table?
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

szms
Forum Contributor
Posts: 101
Joined: Thu Jun 26, 2003 12:23 pm

Post by szms »

Here is my code for two different cells. But if I don't write inside the cell, it appears a single cell. How can I show those empty cell according to their width. My ultimate goal is to put a java script meny bar in one cell.

<html>
<head>
<title>
Table Test
</title>
</head>
<body>
<table border = 4>
<tr>
<td width = "10%"></td>
<td width = "30%"></td>
</tr>
</table>

</body>

</html>
microthick
Forum Regular
Posts: 543
Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC

Post by microthick »

As long as you add content to the cells, they will appear as separate cells.

<html>
<head>
<title>
Table Test
</title>
</head>
<body>
<table border = 4>
<tr>
<td width = "10%">&nbsp;</td>
<td width = "30%">&nbsp;</td>
</tr>
</table>

</body>

</html>
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

note: html width tag has been deprecated in html 4.01
it is unsupported in xhtml 1.0
the css method is width:##**

where ## is a number
and ** is the type (note: ** is not needed for 0, types include but are not limited to px, em, in, cm)

more info on css:
http://javascriptkit.com/dhtmltutors/cssreference.shtml
http://www.w3schools.com/css/css_reference.asp
http://simplythebest.net/info/css_properties.html
Post Reply