Jump to content

Archived

This topic is now archived and is closed to further replies.

searls03

automatic extension

Recommended Posts

in dreamweaver, how do I build a template that would automatically extend a side bar to match content length?  is this possible?

Share this post


Link to post
Share on other sites

Do you mean you have a two column design and want one to stretch height or width? 

Share this post


Link to post
Share on other sites

Ya I want it to stretch to equal same length as the second column or the content.....

Share this post


Link to post
Share on other sites

Ah, this isn't a DreamWeaver function but rather a CSS thing. One way to do it is to use a jQuery plugin (I don't have a link handy, sorry).  Another way to do it is like this.  Let's assume we have two columns, left, and right.  Put those into a third div tag.  Then, and this is the key, put a background graphic into that third div tag that has the background graphic for the left and right columns.

 

Here's a demo I use in my classroom: http://43monkeys.com/temp/phpfreaks/equal-hight-columns/sample.html

Share this post


Link to post
Share on other sites

I don't have a clue.  Try Googling some thing like "jquery equal columns".

Share this post


Link to post
Share on other sites

alright, I have looked and looked and tried different codes, but I have not been able to find any that are working for this......could you help me.......the highlighted are what is trying to be set equal........(not in code brackets)

<?php

session_start(); // Must start session first thing

/*

Created By Adam Khoury @ www.flashbuilding.com

-----------------------June 20, 2008-----------------------

*/

// Here we run a login check

if (!isset($_SESSION['id'])) {

  echo 'Please <a href="login.php">log in</a> to access your account';

  exit();

}

//Connect to the database through our include

include_once "connect_to_mysql.php";

// Place Session variable 'id' into local variable

$userid = $_SESSION['id'];

// Query member data from the database and ready it for display

$sql = mysql_query("SELECT * FROM members WHERE userid='$userid' LIMIT 1");

while($row = mysql_fetch_array($sql)){

$name = $row["name"];

$phone = $row["phone"];

$username = $row["username"];

$address = $row["address"];

$city = $row["city"];

$state = $row["state"];

$zip = $row["zip"];

$cell = $row["cell"];

$email = $row["email"];

$accounttype = $row["accounttype"];

$rank = $row["rank"];

$badges = $row["badges"];

}

 

  $query = "SELECT event, description, startdate, enddate, location, subevent1, subevent2, subevent3, subevent4, subevent5, subevent6, subevent7, subevent8, price1, price2, price3, price4, price5, price6, price7, price8 FROM Registration WHERE eventid=".$_GET['eventid'];

  $result = mysql_query($query) or die('Error : ' . mysql_error());

  $row = mysql_fetch_array($result, MYSQL_ASSOC);

  $startdate = $row['startdate'];

      $enddate = $row['enddate'];

    $location = $row['location'];

  $description = $row['description'];

$event= $row["event"];

$subevent1 = $row['subevent1'];

$subevent2 = $row['subevent2'];

$subevent3 = $row['subevent3'];

$subevent4 = $row['subevent4'];

$subevent5 = $row['subevent5'];

$subevent6 = $row['subevent6'];

$subevent7 = $row['subevent7'];

$subevent8 = $row['subevent8'];

$title1 = $row['title1'];

$title2 = $row['title2'];

$title3 = $row['title3'];

$title4 = $row['title4'];

$title5 = $row['title5'];

$title6 = $row['title6'];

$title7 = $row['title7'];

$title8 = $row['title8'];

$price1 = $row['price1'];

$price2 = $row['price2'];

$price3 = $row['price3'];

$price4 = $row['price4'];

$price5 = $row['price5'];

$price6 = $row['price6'];

$price7 = $row['price7'];

$price8 = $row['price8'];

$date1 = $row['date1'];

$date2 = $row['date2'];

$date3 = $row['date3'];

$date4 = $row['date4'];

$date5 = $row['date5'];

$date6 = $row['date6'];

$date7 = $row['date7'];

$date8 = $row['date8'];

 

?>

 

<!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"><!-- InstanceBegin template="/Templates/template2.dwt.php" codeOutsideHTMLIsLocked="false" -->

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<!-- InstanceBeginEditable name="doctitle" -->

<title>Untitled Document</title>

<!-- InstanceEndEditable -->

<style type="text/css">

#apDiv1 {

position:absolute;

left:33px;

top:320px;

width:252px;

height:48px;

z-index:1;

}

#apDiv2 {

position:absolute;

left:33px;

top:361px;

width:254px;

height:46px;

z-index:2;

}

#apDiv3 {

position:absolute;

left:33px;

top:525px;

width:256px;

height:43px;

z-index:3;

}

#apDiv4 {

position:absolute;

left:33px;

top:402px;

width:250px;

height:48px;

z-index:4;

}

#apDiv5 {

position:absolute;

left:106px;

top:616px;

width:263px;

height:255px;

z-index:5;

}

#apDiv6 {

position:absolute;

left:323px;

top:200px;

width:898px;

height:530px;

z-index:1;

}

#apDiv7 {

position:absolute;

left:33px;

top:443px;

width:266px;

height:42px;

z-index:6;

}

#apDiv8 {

position:absolute;

left:111px;

top:500px;

width:125px;

height:37px;

z-index:7;

}

#apDiv8 strong {

font-size: 24px;

}

#apDiv9 {

position:absolute;

left:33px;

top:408px;

width:267px;

height:49px;

z-index:8;

}

#apDiv10 {

position:absolute;

left:33px;

top:449px;

width:242px;

height:23px;

z-index:9;

}

#apDiv8 a {

color: #000;

}

#apDiv11 {

position:absolute;

left:101px;

top:490px;

width:168px;

height:42px;

z-index:10;

font-size: 24px;

font-weight: bold;

}

#apDiv11 a {

color: #000;

}

#apDiv12 {

position:absolute;

left:33px;

top:210px;

width:205px;

height:135px;

z-index:11;

}

#apDiv12 {

text-align: center;

}

#apDiv13 {

position:absolute;

left:33px;

top:320px;

width:258px;

height:47px;

z-index:12;

}

#apDiv {

position:absolute;

left:33px;

top:484px;

width:225px;

height:35px;

z-index:11;

}

#apDiv14 {

position:absolute;

left:33px;

top:566px;

width:298px;

height:51px;

z-index:12;

}

#apDiv15 { position:absolute;

left:101px;

top:611px;

width:168px;

height:42px;

z-index:10;

font-size: 24px;

font-weight: bold;

}

#apDiv5 a {

font-size: 24px;

color: #000;

font-weight: bold;

}

</style>

<script type="text/javascript">

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;

}

function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

}

function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}

function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

  if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

</script>

<!-- InstanceBeginEditable name="head" -->

 

<style type="text/css">

#apDiv16 {

position:absolute;

left:504px;

top:59px;

width:170px;

height:49px;

z-index:13;

}

#apDiv17 {

position:absolute;

left:-315px;

top:508px;

width:274px;

height:599px;

z-index:13;

}

#apDiv18 {

position:absolute;

left:-312px;

top:3px;

width:282px;

height:412px;

z-index:13;

background-color: #FF0200;

}

</style>

 

<!-- InstanceEndEditable -->

<!-- InstanceParam name="id" type="text" value="apDiv6" -->

</head>

<body onload="MM_preloadImages('button/myprofile2.png','button/pictures2.png','button/projects1.png','button/news2.png','button/eventmanager2.png','button/membermanager2.png','button/newsmanager2.png')">

<div id="apDiv2"><a href="register.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','button/register2.png',1)"><img src="button/register1.png" name="Image3" width="235" height="50" border="0" id="Image3" /></a></div>

<div id="apDiv4"><a href="projects.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','button/projects2.png',1)"><img src="button/projects1.png" name="Image4" width="235" height="50" border="0" id="Image4" /></a></div>

 

<div id="apDiv11"><?php if ($accounttype == "Scout") {

echo '<a href="../logout.php">Logout</a>';} ?></div>

<div id="apDiv12"><?php echo "$accounttype"; ?>

  <p><?php echo "$name"; ?></p>

  <p>Troop 78</p>

</div>

<div id="apDiv13"><a href="myprofile.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','button/myprofile2.png',1)"><img src="button/myprofile1.png" name="Image5" width="235" height="50" border="0" id="Image5" /></a></div>

<div id="apDiv5"><?php if ($accounttype == "Admin") {

echo "<a href=\"../logout.php\">Logout</a>";

}

?></div>

</a>

</div>

<div id="apDiv6"><!-- InstanceBeginEditable name="EditRegion3" -->

  <div id="apDiv18"></div>

 

  <div id="apDiv16"><a href="register.php">Back to Event Calendar</a></div>

  <?php

// when displaying an article show a link

// to see the article list

if(isset($_GET['eventid']))

{

?>

<div id="apDiv26 " >

  <p>Date(s): <?php echo $startdate; ?><span class="klgjsa"> -</span> <?php echo $enddate; ?><br />

      <span class="fgsdfg">Location:</span> <?php echo $location; ?><br />

      <span class="adfasdf">Description</span><span class="adfdas">:</span><?php echo $description; ?>

  </p>

  <p> </p>

  <table width="577" border="1" cellspacing="0" cellpadding="0">

    <tr>

      <td width="565" bgcolor="#999999" class="hjkh" scope="col">EVENTS</td>

    </tr>

    <tr>

      <td bgcolor="#999999" class="hjkh" scope="col"><table width="572" border="0" cellspacing="0" cellpadding="0">

        <tr>

          <td width="90" bgcolor="#FFFFFF" scope="col"><?php

 

$sql = mysql_query("SELECT * FROM Registration WHERE eventid=".$_GET['eventid']." LIMIT 1");

while($row = mysql_fetch_array($sql)){

$event= $row["event"];

$subevent1 = $row['subevent1'];

$subevent2 = $row['subevent2'];

$subevent3 = $row['subevent3'];

$subevent4 = $row['subevent4'];

$subevent5 = $row['subevent5'];

$subevent6 = $row['subevent6'];

$subevent7 = $row['subevent7'];

$subevent8 = $row['subevent8'];

$title1 = $row['title1'];

$title2 = $row['title2'];

$title3 = $row['title3'];

$title4 = $row['title4'];

$title5 = $row['title5'];

$title6 = $row['title6'];

$title7 = $row['title7'];

$title8 = $row['title8'];

$price1 = $row['price1'];

$price2 = $row['price2'];

$price3 = $row['price3'];

$price4 = $row['price4'];

$price5 = $row['price5'];

$price6 = $row['price6'];

$price7 = $row['price7'];

$price8 = $row['price8'];

$date1 = $row['date1'];

$date2 = $row['date2'];

$date3 = $row['date3'];

$date4 = $row['date4'];

$date5 = $row['date5'];

$date6 = $row['date6'];

$date7 = $row['date7'];

$date8 = $row['date8'];

 

 

//this will echo the contents of each db row as they are iterated in the loop

 

#############################

if (!empty($subevent1)) { echo "<br/><strong>$title1</strong><br />$date1<br />$ $price1<br /><br />"; }

if (!empty($subevent2)) { echo "<br/><strong>$title2</strong><br />$date2<br />$ $price2<br /><br />"; }

if (!empty($subevent3)) { echo "<br/><strong>$title3</strong><br />$date3<br />$ $price3<br /><br />"; }

if (!empty($subevent4)) { echo "<br/><strong>$title4</strong><br />$date4<br />$ $price4<br /><br />"; }

if (!empty($subevent5)) { echo "<br/><strong>$title5</strong><br />$date5<br />$ $price5<br /><br />"; }

if (!empty($subevent6)) { echo "<br/><strong>$title6</strong><br />$date6<br />$ $price6<br /><br />"; }

if (!empty($subevent7)) { echo "<br/><strong>$title7</strong><br />$date7<br />$ $price7<br /><br />"; }

if (!empty($subevent8)) { echo "<br/><strong>$title8</strong><br />$date8<br />$ $price8"; }

}

//etc etc

 

?></td>

          <td width="462" bgcolor="#FFFFFF" scope="col"> </td>

        </tr>

      </table></td>

    </tr>

  </table>

  <table width="200" border="0" cellspacing="0" cellpadding="0">

    <tr>

      <td height="31" scope="col"><?php

if (isset($_GET['eventid'])) {

include('connect1.php');

$sql = mysql_query("SELECT * FROM Registration WHERE eventid=".$_GET['eventid']." LIMIT 1");

 

$result = mysqli_query($dbcon, $query) or die('error getting data');

 

echo "<table>";

while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC))

{

echo "<tr><td>";

echo "<form action='registration.php' method='get'><input type='hidden' name='eventid' value='{$row['eventid']}'><INPUT TYPE='submit' name='submit' VALUE='Register'></form>\n";

echo "</td></tr>";

}

echo "</table>";

 

}

?></td>

    </tr>

  </table>

  <p> </p>

  <table width="200" border="0" cellspacing="0" cellpadding="0">

  <tr>

    <th scope="col">

 

 

    </th>

  </tr>

</table>

</div>

  </div>

  <?php

}

?>

<!-- InstanceEndEditable --></div>

<div id="apDiv7"><a href="news.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image6','','button/news2.png',1)"><img src="button/news1.png" name="Image6" width="235" height="50" border="0" id="Image6" /></a></div>

<div id="apDiv"> <?php if ($accounttype == "Admin") {

echo "<a href=\"../search1.php\" onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image7','','../button/membermanager2.png',1)\"><img src=\"../button/membermanager1.png\" name=\"Image7\" width=\"235\" height=\"50\" border=\"0\" id=\"Image7\" /></a>";

}

?></div>

<div id="apDiv3"><?php if ($accounttype == "Admin") {

echo "<a href=\"../addevent.php\" onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image8','','../button/eventmanager2.png',1)\"><img src=\"../button/eventmanager1.png\"  name=\"Image8\" width=\"235\" height=\"50\" border=\"0\" id=\"Image8\" /></a>";

}

?>

</div>

<div id="apDiv14"><?php if ($accounttype == "Admin") {

echo "<a href=\"../addart.php\" onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image9','','../button/newsmanager2.png',1)\"><img src=\"../button/newsmanager1.png\"  name=\"Image9\" width=\"234\" height=\"50\" border=\"0\" id=\"Image9\" /></a>";

}

?>

</div>

<img name="boyscout" src="button/boyscout1.png" width="1180" height="700" border="0" id="boyscout" alt="" />

</body>

<!-- InstanceEnd --></html>

 

 

 

so Please help me if you can...........

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.