Sorry, I couldn't find this forum yesterday when I posted this question origionally in a .NET forum...
Trying to build an elastic DIV box with a minimum width of 25%.
Without the doctype definition, we can do the following hack to get minwidth to work in all browsers:
min-width:25%;
width:auto !important;
width:25%;
But with the doctype definition, the only directive I can get to stick is "width:25%;" which forces the div to 25% anything bigger than that bleeds over into the rest of the page content.
Otherwise the div expands to 100% of the available space.
The following is a quick mock up page that can be played with to see what is going on. Basically, we should be able to set the minimum width of the div to 1px and the div should grow to be as big as the content within the div.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "" title="
<style>
.smallDialog{
border:solid 1px;
min-height:50px;
height:auto !important;
height:50px;
width:25%;
}
</style>
<div class="smallDialog">
<select>
<option>blah blah blah blah blah blah blah blah blah blahb</option>
</select>
This is a big test This is a big test This is a big test This is a big test This is a big test
</div>
ASP, VB, VBS, Cold Fusion, SQL, DTS, T-SQL, PL-SQL, IBM-MQ, Crystal Reports, Crystal Enterprise
Trying to build an elastic DIV box with a minimum width of 25%.
Without the doctype definition, we can do the following hack to get minwidth to work in all browsers:
min-width:25%;
width:auto !important;
width:25%;
But with the doctype definition, the only directive I can get to stick is "width:25%;" which forces the div to 25% anything bigger than that bleeds over into the rest of the page content.
Otherwise the div expands to 100% of the available space.
The following is a quick mock up page that can be played with to see what is going on. Basically, we should be able to set the minimum width of the div to 1px and the div should grow to be as big as the content within the div.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "" title="
<style>
.smallDialog{
border:solid 1px;
min-height:50px;
height:auto !important;
height:50px;
width:25%;
}
</style>
<div class="smallDialog">
<select>
<option>blah blah blah blah blah blah blah blah blah blahb</option>
</select>
This is a big test This is a big test This is a big test This is a big test This is a big test
</div>
ASP, VB, VBS, Cold Fusion, SQL, DTS, T-SQL, PL-SQL, IBM-MQ, Crystal Reports, Crystal Enterprise