Send to a Friend

webmasterwilliam's avatar

CSS <div> issue.

Asked by webmasterwilliam (165points) August 16th, 2008

Suppose I have the following setup

<div id=“leftColumn”>
  <div id=“leftChild1”><?php require(“include/errorMsg.inc”) ?></div>
  <div id=“leftChild2”><?php require(“ads/googleAd1.inc”) ?></div>
</div>

<div id=“rightColumn”>
  <div id=“rightChild1”><?php require(“include/article1.inc”) ?></div>
  <div id=“rightChild2”><?php require(“include/article2.inc”) ?></div>
</div>

<div id=“centerColumn”>
  <?php
    if ($mode=“a” {
      require(“include/form_a”);}
   else {
      require(“include/form_b);}
   ?>
</div>

Now suppose that leftChild1 is an error display module and is only to be inserted if there is an error detected in the code that is building the main content by the php code form_a or form_b.

Since the form code in the centerColumn is beyond the leftChild1 element, is there a way to define the leftColumn container early and then later insert the children divs into it depending upon the need?

Using Fluther

or

Using Email

Separate multiple emails with commas.
We’ll only use these emails for this message.