Hello,
I'm trying to code a template where there is no set width for the main box, however, when the side box is displayed on the page, it'd have a width of 100px. Therefore, I'd want the main box to move over to fit with the side box on that specific page.
Demo:
http://g2n.us/Dev/test.php
Code:
Hopefully that make sense.PHP Code:<div style="margin: auto; width: 500px; background: #F3F3F3; padding: 10px; border-radius: 5px; font-family: Verdana; font-size: 10px;">
<!--
/* I want to have this removed on certain pages. */
/* Side box. */
--!>
<div style="float: right; width: 100px;">
<div style="background: red; padding: 5px; color: white; border-radius: 5px; margin-left: 10px;">
Test
</div>
</div>
<!--
/* I want this to adjust based on if the side box above is on the page or not. */
/* Main box. */
--!>
<div style="background: black; padding: 5px; color: white; border-radius: 5px;">Test
</div>
<div style="clear: both;">
</div>
</div>


Reply With Quote![[CSS] Main Box No Set Width](http://ragezone.com/hyper728.png)


