Dreamweaver CS3, repeating regions horizonally

Joined
Aug 12, 2006
Messages
60
does anyone know how to do this? when i repeat a region in dreamweaver it only repeats in a vertical fashion, is there a way to repeat horizonally?
 
I don't use Dreamweaver but if I knew a little more about what you were trying to repeat, I could open it up and take a look at it for you.

EDIT: Ok now that I looked it up, I see what its supposed to do. As said before, I have no experience with ui's like dreamweaver but I'm gonna take a stab at this. If you've set a table row as the repeatable region, I imagine its always going to increment vertically since its just adding a new row.

If possible, I'd try to select a table column as the repeatable region... or maybe select a div as the repeatable region and just make sure that the div is assigned a width and float it to the left. I have no idea if any of that will work but it makes sense in my head :)
 
Create the table as you'd like it to appear. Select it and then click Insert > Data Objects > Repeat Region.
 
When you do a vertically repeating region, you get this:

<table>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['whatever']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>

As you run through the do...while loop, you get a <tr> and a <td> each time. What you're looking for is having one <tr> and repeating the <td>'s.

Change it to this:

<table>
<tr>
<?php do { ?>
<td><?php echo $row_Recordset1['whatever']; ?></td>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</tr>
</table>

Move the <tr>'s out of the loop. Then you get one <tr> and multiple <td>'s.
 
Use CSS controled divs and float them left.

Like this:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body {
	text-align: center;
	background: #CC6600;
}
* {
	margin: 0;
	padding: 0;
	border: none;
}
.box {
	width: 50px;
	height: 50px;
	float: left;
	margin: 10px 0 0 5px;
	background: #00FF00;
}
</style>
</head>
<body>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</body>
</html>

Use the right DocType
Validate your markup
Validate your CSS
Why validating is good
Why tables are bad
 
Back
Top