SimplePortal
Customization => Custom Coding => Topic started by: ScottyBoy on June 25, 2010, 06:02:26 PM
-
For some reason, whenever I try to use position:absolute; or float:right/left; in an SP page, the content goes outside the box (see screen shot). Any idea why that happens?
Page Code
<?php
function headerText($title)
{
echo '<div class="cat_bar"><h3 class="catbg" style="font-size: 1.3em; font-weight: bold;">', $title ,'</h3></div>';
}
headerText("Developer");
echo '
<span class="staffLeft">left</span>
<span class="staffRight">right</span>
';
?>
CSS
/* Staff Page block classes */
.staffLeft
{
float: left;
margin-left: 10px;
margin-top: 10px;
}
.staffRight
{
float: right;
margin-right: 10px;
margin-top: 10px;
}
-
What is your browser? If you use IE6, this very normal. :D
-
I use Firefox 3.6.4.
-
Try the code below:
<?php
function headerText($title)
{
echo '<div class="cat_bar"><h3 class="catbg" style="font-size: 1.3em; font-weight: bold;">', $title ,'</h3></div>';
}
headerText("Developer");
echo '
<div style="overflow: auto;">
<span class="staffLeft">left</span>
<span class="staffRight">right</span>
</div>
';
?>
-
Thank you very much, that worked perfectly. ;D