kriscons
01-23-2008, 12:03 PM
Hi
I am having a problem with displaying 2 DIV's in column format (i.e. DIV number 2 (#pagecontent) to the right hand side of DIV number 1 (#leftnavigation)). This only happens in Firefox and Opera.
My #pagecontent DIV needs to be an 'auto' width as the #leftnavigation DIV may not always be present. Therefore #pagecontent will need to expand and contract depending on its surround space. Simple eh?
I have the following markup:
<div id="contentcontainer">
<div id="leftnavigation">
<p>Navigation options will go here if enabled</p>
</div>
<div id="pagecontent">
<p>Page content will go here...</p>
</div>
</div>
Here is the CSS for the above markup:
#contentcontainer {
width: 560px;
padding: 0;
margin: 0;
min-height: 435px;
height: auto !important; /* min-height fix for IE6 */
height: 435px;
background: url(../images/content_gradient.jpg) top left no-repeat;
float: left;
}
#leftnavigation {
width: 140px;
margin: 10px 0 0 10px;
padding: 0;
float: left;
clear: none;
}
#pagecontent {
width: auto;
padding: 0;
margin: 0;
float: left;
}
The problem seems to be related to the content that is loaded into #pagecontent. The content itself seems to push the width of #pagecontent DIV to a size larger than what is available on the page and therefore knocks it down underneath the #leftnavigation DIV.
I have attached an illustration of my problem also.
Please help with any suggestions!!!
Ta in advance.
I am having a problem with displaying 2 DIV's in column format (i.e. DIV number 2 (#pagecontent) to the right hand side of DIV number 1 (#leftnavigation)). This only happens in Firefox and Opera.
My #pagecontent DIV needs to be an 'auto' width as the #leftnavigation DIV may not always be present. Therefore #pagecontent will need to expand and contract depending on its surround space. Simple eh?
I have the following markup:
<div id="contentcontainer">
<div id="leftnavigation">
<p>Navigation options will go here if enabled</p>
</div>
<div id="pagecontent">
<p>Page content will go here...</p>
</div>
</div>
Here is the CSS for the above markup:
#contentcontainer {
width: 560px;
padding: 0;
margin: 0;
min-height: 435px;
height: auto !important; /* min-height fix for IE6 */
height: 435px;
background: url(../images/content_gradient.jpg) top left no-repeat;
float: left;
}
#leftnavigation {
width: 140px;
margin: 10px 0 0 10px;
padding: 0;
float: left;
clear: none;
}
#pagecontent {
width: auto;
padding: 0;
margin: 0;
float: left;
}
The problem seems to be related to the content that is loaded into #pagecontent. The content itself seems to push the width of #pagecontent DIV to a size larger than what is available on the page and therefore knocks it down underneath the #leftnavigation DIV.
I have attached an illustration of my problem also.
Please help with any suggestions!!!
Ta in advance.