0

hi,
i'm strugling with some difficulties.
i can't seem to get something to work.

<table id="wijn">
			<tr>
			<?php
				$query = "SELECT id, domein, naam, streek, substreek, jaar, type, smaak, formaat, prijsnormaal, prijs6, prijs12, prijs24, afbeelding from wijnen WHERE kleur = 'rood'";
				$result = mysql_query($query) or die('Error : ' . mysql_error());
				while(list($id, $domein, $naam, $streek, $substreek, $jaar, $type, $smaak, $formaat, $prijsnormaal, $prijs6, $prijs12, $prijs24, $afbeelding) = mysql_fetch_array($result, MYSQL_NUM))
				{
			?>
			<td>
			<h1><?php echo $naam;?></h1>
			<h2>
			<table>
				<tr>
					<td class="leftinfo">
						Domein
					</td>
					<td>
						<?php
						$newtext = wordwrap($domein, 20, "<br />\n");
						echo $newtext;
						?>
					</td>
				</tr>
				<tr>
					<td class="leftinfo">
						Streek
					</td>
					<td>
						<?php
						$newtext = wordwrap($streek, 20, "<br />\n");
						echo $newtext;
						?>
					</td>
				</tr>
				<tr>
					<td class="leftinfo">
						Substreek
					</td>
					<td>
						<?php
						$newtext = wordwrap($substreek, 20, "<br />\n");
						echo $newtext;
						?>
					</td>
				</tr>
				<tr>
					<td class="leftinfo">
						Jaar
					</td>
					<td>
						<?php echo $jaar;?>
					</td>
				</tr>
				<tr>
					<td class="leftinfo">
						Type
					</td>
					<td>
						<?php echo $type;?>
					</td>
				</tr>
				<tr>
					<td class="leftinfo">
						Smaak
					</td>
					<td>
						<?php echo $smaak;?>
					</td>
				</tr>
				<tr>
					<td class="leftinfo">
						Formaat
					</td>
					<td>
						1 fles(<?php echo $formaat;?> cl)
					</td>
				</tr>
				<tr>
					<td class="leftinfo">
						Prijs normaal
					</td>
					<td>
						€ <s><?php echo $prijsnormaal;?></s>
					</td>
				</tr>
				<tr>
					<td class="leftinfo">
						Vanaf
					</td>
					<td>
						€ <?php echo $prijs24;?> per fles
					</td>
				</tr>
			</table>
			</h2>
			<div id="centerimg">
				<a href="javascript: void(0)" onclick="window.open('images/<?php echo $afbeelding;?>', '<?php echo $afbeelding; ?>', 'width=119, height=400'); return false;"><img src="images/<?php echo $afbeelding;?>" height="100%" border="0px"></a>
			</div>
			<div id="centermeerinfo">
				<a href="wijn.php?id=<?php echo $id;?>"><img src="images/meer info.gif" border="0px"></a>
			</div>
			</td>
			<?php
			$n++;
			if ($n % 2 == 0) echo '</tr><tr>';  
				}
			?>
			</table>

now i want to get the first td column of every row to be like 40px width,
so i should add in my css file something like this:

td.leftinfo{
width:40px;
}

but this doesn't seems to be working.
what i've got in my css file so far:

#container{
margin: 0 auto 10px auto;
width: 800px;
position: relative;
}
#header {
position: relative;
height: 150px;
top: 4px;
}
#streken{
position:absolute;
left:20%;
top:25%;
}
#center{
position:absolute;
top:200px;
width:750px;
}
#footer{
position:absolute;
top:1000px;
right:0%;
}
#center1{
position:absolute;
left:0px;
width:400px;
height:350px;
}
#center2{
position:absolute;
left:450px;
width:400px;
height:350px;
}
#center3{
position:absolute;
left:0px;
width:400px;
height:400px;
top:350px;
}
#center4{
position:absolute;
left:450px;
width:400px;
height:400px;
top:350px;	
}
#centerimg{
position:absolute;
left:65%;
top:10%;
height:62.5%;
width:50%;
}
#centermeerinfo{
position:absolute;
left:65%;
top:75%;
height:67.5%;
width:50%;
}
#streken{
position:absolute;
left:0%;
top:100px;
width:100%;
}
#streken td{
width:160px;
}
#wijn td{
width:400px;
}
#info td{
width:120px;
}
td.leftinfo{
width:20px;
}
h1{
font-size:15pt;
font-family:times new roman;
}
h2{
font-size:12pt;
font-family:times new roman;
font-weight:normal;
}

does anyone see what i'm doing wrong here?

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by thijscream
0

td width is based on the widest cell in the column. So if row 1, column 1 is 50px wide and row 10, column 1 is 25px, the entire column will be 50px.

0

never mind, thanks for info, but found out it was the structure of the tables within the tables
just hard to see when your working in it for 5 hours in a row

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.