I want to use DIV's instead of tables...
I had all kinds of "boxes" with rounded corners.
That was pretty easy to make (just slice the image and use it as cell background).
But how do you do that with DIV's?
I managed to make a box with rounded corners, but everytime I type in too many lines the text just floats out of the div... :/
Anyone who can help?
Script
CODE
<html>
<head>
<title></title>
<style>
.box{
width:250px;
height:250px;
border:solid;
border-width:1px;
position:relative;
background-image:url(images/box/bg.png);
}
.box_content{
background-image:url(images/box/bg.png);
width:240;
height:240px;
top:5px;
left:5px;
position:absolute;
float:center;
}
.box_lefttop{
width:5px;
height:5px;
background-image:url(images/box/left_top.png);
position:absolute;
float:left;
}
.box_righttop{
width:5px;
height:5px;
background-image:url(images/box/right_top.png);
position:absolute;
right:0px;
}
.box_leftbottom{
width:5px;
height:5px;
background-image:url(images/box/left_bottom.png);
position:absolute;
left:0px;
bottom:0px;
}
.box_rightbottom{
width:5px;
height:5px;
background-image:url(images/box/right_bottom.png);
position:absolute;
right:0px;
bottom:0px;
}
</style>
</head>
<body>
<div class="box">
<!-- TOP -->
<div class="box_lefttop"></div>
<div class="box_righttop"></div>
<!-- CONTENT -->
<div class="box_content">All the content comes here...</div>
<!-- TOP -->
<div class="box_leftbottom"></div>
<div class="box_rightbottom"></div>
</div>
</body>
</html>
<head>
<title></title>
<style>
.box{
width:250px;
height:250px;
border:solid;
border-width:1px;
position:relative;
background-image:url(images/box/bg.png);
}
.box_content{
background-image:url(images/box/bg.png);
width:240;
height:240px;
top:5px;
left:5px;
position:absolute;
float:center;
}
.box_lefttop{
width:5px;
height:5px;
background-image:url(images/box/left_top.png);
position:absolute;
float:left;
}
.box_righttop{
width:5px;
height:5px;
background-image:url(images/box/right_top.png);
position:absolute;
right:0px;
}
.box_leftbottom{
width:5px;
height:5px;
background-image:url(images/box/left_bottom.png);
position:absolute;
left:0px;
bottom:0px;
}
.box_rightbottom{
width:5px;
height:5px;
background-image:url(images/box/right_bottom.png);
position:absolute;
right:0px;
bottom:0px;
}
</style>
</head>
<body>
<div class="box">
<!-- TOP -->
<div class="box_lefttop"></div>
<div class="box_righttop"></div>
<!-- CONTENT -->
<div class="box_content">All the content comes here...</div>
<!-- TOP -->
<div class="box_leftbottom"></div>
<div class="box_rightbottom"></div>
</div>
</body>
</html>