Forum Moderators: not2easy
My problem is that the dropdown box can be different widths due to contect but I cant get the div to change it's size so that it still stays next to the dropdown box.
Here is the css for the div
.hardInfoBox
{
FLOAT: right;
CLEAR: left;
OVERFLOW: auto;
HEIGHT: 110px;
POSITION:relative;
border: medium rgb(0,0,0) dotted
}
.hardInfoBox .hardInfoBoxHeader
{
MARGIN-TOP: 10px;
font-size: 13;
font-weight: bold;
text-align: center;
HEIGHT: 20px
}
.hardInfoBox .hardInfoBoxContent
{
MARGIN-TOP: 8px;
MARGIN-LEFT: 4px;
}
.blocker
{
PADDING-TOP: 4px;
PADDING-BOTTOM: 4px;
DISPLAY: block
}
.formBlock
{
PADDING-TOP: 10px;
PADDING-LEFT: 6px;
PADDING-BOTTOM: 10px;
WIDTH: 100%;/*600px;*/
BACKGROUND: #eae0cd
}
Here is the html code
<DIV class=formBlock>
<LABEL for="labeldrop" class=blocker>LabelforDropDown</LABEL>
<DIV class=hardInfoBox>
<DIV class=hardInfoBoxHeader></DIV>
<DIV class=hardInfoBoxContent></DIV>
</DIV>
<SELECT name="menu" id=dropMenu>
<OPTION value=default selected>Choose an option</OPTION>
<OPTION value=subcateg>An option</OPTION>
</SELECT>
</DIV>
**Notice the div has 2 divs inside (One for header and another for data info)
Now my problem is that I use the css template for different pages thus the dropdown menu can be different sizes and I'd like that the notebox (the div) changed it's size so that it stays inline with the menu, right next to it but if I dont have a width property on the inside div it always fills up 100% of the width of the block and the dropdown menu appears above it. If I do set a width (Like 60% or so) the box stays at a fixed size defeating the whole point (Although they stay inline to each other as intended).
Is there a way to do this with css and html or do I really have to use javascript or some other language to calculate and resize the div (Which wouldnt be so hard but I'd prefer that css took care of it by itslef)?
I have tried setting the div to inline but that didnt do the job.
Best Regards
NooK
[edited by: NooK at 1:26 pm (utc) on Aug. 8, 2007]
Just a guess.