Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with IF condition recognizing DIV and CSS

Status
Not open for further replies.

tilmant

IS-IT--Management
Jul 11, 2001
10
US
I'm designing a template for my Joomla site and am having a little problem with using an if statement, DIV, CSS to reveal and hide modules. The if condition works correctly and reveals the module(s) if they've been assigned. However, it doesn't recognize DIV class and draw a border around the module. Here's the PHP code in the index file followed and the CSS code. Any help would be appreciated.

----------Index.php
<div id="wrap">

<div id="header" >
<div class="header-left"><?php mosPathWay(); ?></div>
<div class="header-right"><?php mosLoadModules ( 'top' ); ?></div>
</div>

<div id="header-image">
<div class="header-image-left"></div>
<div class="header-image-right"><?php echo mosCurrentDate(); ?></div>
</div>

<?php if ($option == 'com_zoom') { ?>
<div id="content-full">
<div class="inside">
<?php mosMainBody(); ?>
</div></div>
<?php } elseif (($option == 'com_events') || ($option == 'com_docman')) {?>
<div id="sidebar">
<div class="inside">
<?php mosLoadModules('left');?>
</div>
<!-- -----------------Problem Area Below------------------- -->
<?php if (mosLoadModules('user1') >0) { ?>
<div class="inside">
<?php mosLoadModules('user1');?>
</div>
<?php } ?>
<!-- -----------------Problem Area Above------------------- -->
</div>
<div id="content-half">
<div class="inside">
<?php mosMainBody(); ?>
</div></div>
<?php } else {?>
<div id="sidebar">
<div class="inside">
<?php mosLoadModules('left');?>
</div>
<div class="inside">
<?php mosLoadModules('user1');?>
</div></div>
<div id="content">
<div class="inside">
<?php mosMainBody(); ?>
</div></div>
<div id="sidebar-2">
<div class="inside">
<?php mosLoadModules('right');?>
</div>
<div class="inside">
<?php mosLoadModules('user5');?>
</div>
<div class="inside">
<?php mosLoadModules('user6');?>
</div></div>

<?php } ?>


<div id="footer"> <?php include_once($mosConfig_absolute_path .'/includes/footer.php');?>
</div>

</div> <!--end of wrap-->

</body> </html>

----------CSS File

/* CSS Document */

* {
margin:0;
padding:0;
}
h1,h2,h3,h4,h5,h6,p,blockquote,form,label,ul,ol,dl,fieldset,address {
margin: 0.5em 0;
}
li,dd {
margin-left:1em;
}
fieldset {
padding:.5em;
}
body {
font-size:76.1%;
font-family:Verdana, Arial, Helvetica, sans-serif;
line-height:1.3em;
}
#header {
background-color: #FFFFFF;
}
#footer {
}
#sidebar-2 {
}
#content {
}
#content-full {
}
#sidebar {
}
.moduletable-topmenu {
color: #00a900;
text-transform: none;
}
.inside {
border: thin solid #f4c741;
}
.pathway {
color: #00a900;
}

/* LInks */
A:link {
color: #00a900;
}
A:visited {
color: #00a900;
}
A:active {
}
A:hover {
}


 
What does the mosLoadModules code look like?
Is the final HTML page source (after the PHP engine has processed the PHP) what you expect it to be (i.e. "inside" div is present where it should be)?

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top