I am attempting to construct a roll-over pop-up box via HTML and CSS. The box is rectagular with an arrow sticking off the left side of it. It needs to scale height based on how much content is in it, and it has a drop-shadow with alpha transparency.
Here is what I have attempted to due:
One big div to contain everyting, within it is 5 other divs to construct the box from .png's with alpha.
since it is fixed width I have it built as following:
1) Top PNG with the top edge drop shadow 159px x 6px
2) body png with the left and right hand drop shadow, set to repeat Y
3) arrow PNG, which floats in the middle of the big div over the body
4) bottom PNG, with the bottom edge drop shadow
5) an empty div with the approrpiate padding to contain the text.
Now, the issue I am running into, is the top and bottom edge PNGs are floating over the repeating background image of the body and since they all have alpha, I can see body PNG running all the way to the top and bottom, ruining the corners of the box.
I have been trying to figure out how to either make the body div start below the top dive and have the bottom div below it, or make the background image start 5px down from the top of the div and end 5px before it ends.
I'm at a loss right now... Any ideas on how to fix this? And, it is not possible to do absolute positioning on this stuff, or it would be too easy.
here is the HTML
and the CSS
Here is what I have attempted to due:
One big div to contain everyting, within it is 5 other divs to construct the box from .png's with alpha.
since it is fixed width I have it built as following:
1) Top PNG with the top edge drop shadow 159px x 6px
2) body png with the left and right hand drop shadow, set to repeat Y
3) arrow PNG, which floats in the middle of the big div over the body
4) bottom PNG, with the bottom edge drop shadow
5) an empty div with the approrpiate padding to contain the text.
Now, the issue I am running into, is the top and bottom edge PNGs are floating over the repeating background image of the body and since they all have alpha, I can see body PNG running all the way to the top and bottom, ruining the corners of the box.
I have been trying to figure out how to either make the body div start below the top dive and have the bottom div below it, or make the background image start 5px down from the top of the div and end 5px before it ends.
I'm at a loss right now... Any ideas on how to fix this? And, it is not possible to do absolute positioning on this stuff, or it would be too easy.
here is the HTML
Code:
<div id="flyoutBox">
<div class="flyoutBody">
<div class="flyoutTop">
<div class="flyoutArrow">
<div class="flyoutBase">
<div class="flyoutText">
Lorem Ipsum is
</div>
</div>
</div>
</div>
</div>
</div>
and the CSS
Code:
#flyoutBox {
position: relative;
left: 3px;
top: 3px;
margin-right: 3px;
margin-bottom: 3px;
width: 159px;
text-align: left;
}
#flyoutBox .flyoutTop {
background-image: url(/html//civis/threads/images/flyout_top.png);
background-position: top left;
background-repeat: no-repeat;
}
#flyoutBox .flyoutBody {
background-image: url(/html//civis/threads/images/flyout_body.png);
background-position: center;
background-repeat: repeat-y;
}
#flyoutBox .flyoutArrow {
background-image: url(/html//civis/threads/images/flyout_arrow.png);
background-position: center;
background-repeat: no-repeat;
}
#flyoutBox .flyoutBase {
background-image: url(/html//civis/threads/images/flyout_base.png);
background-repeat: no-repeat;
background-position: bottom left;
}
#flyoutBox .flyoutText {
font-family: arial, helvetica, sans-serif;
font-size: 0.8em;
color: #999999;
text-align: left;
padding-left: 26px;
padding-top: 15px;
padding-bottom: 15px;
padding-right: 15px;
}