I'm creating a "rounded corners" container that I'll be using for custom popups and tooltips. Originaly, I have used 3x3 table with my rounded pngs as the corner content.
These rounded pngs are 24x24 and you can see how it instantly forces a 24px margin for my inner content. I'm wanting to convert the markup to Divs for more margin/padding flexibility.
I really want that 24px gradient on top for the professional look. I'm almost done with the Div container but I'm up against a HARD stump! I can't get the container div to dynamically expand to encompass the child content! Here's my code so far. For clarity on your part, I've removed the background images and replaced them with a simple background color.
<div id="container" style="position: absolute; width: 200px; height: 100px;">
<div id="topLeft" style="background-color: Aqua; position: absolute; width: 24px;
height: 24px; top: 0px; left: 0px;">
</div>
<div id="topRight" style="background-color: Aqua; position: absolute; width: 24px;
height: 24px; top: 0px; right: 0px;">
</div>
<div id="bottomLeft" style="background-color: Aqua; position: absolute; width: 24px;
height: 24px; bottom: 0px; left: 0px;">
</div>
<div id="bottomRight" style="background-color: Aqua; position: absolute; width: 24px;
height: 24px; right: 0px; bottom: 0px">
</div>
<div id="topFill" style="background-color: Lime; position: absolute; top: 0px; left: 24px;
right: 24px; height: 24px;">
</div>
<div id="leftFill" style="background-color: Yellow; position: absolute; width: 24px;
left: 0px; bottom: 24px; top: 24px;">
</div>
<div id="bottomFill" style="background-color: Lime; position: absolute; height: 24px;
bottom: 0px; left: 24px; right: 24px;">
</div>
<div id="rightFill" style="background-color: Yellow; position: absolute; width: 24px;
top: 24px; right: 0px; bottom: 24px;">
</div>
<div id="middleFill" style="background-color: Fuchsia; position: absolute; left: 24px;
right: 24px; top: 24px; bottom: 24px;">
</div>
<div id="contentContainer" style="top: 0px; left: 0px; white-space: nowrap; position: absolute;">
ALongStringOFTEXTThatDoesNotBreakToForceTestIfTheDivWillProperlyExpand
</div>
</div>
Thanks to anyone who can pull me out of the mess! By the way, this post has been after many hours of research and loss of sanity. ;-)