Garindan
02-26-2009, 09:04 PM
Hi all, first post. This site looks really good ;)
Can anyone help me out with this? I am trying to create a 'rounded corner' expandable box with four corner images. I know there are other methods but the four corners fit in with the rest of the site design and i thought it would be best.
I have the four corner images positioned correctly but i can't get the box to expand and i don't know where i've gone wrong. Its fixed width so only needs to expand down. Instead the text just flows over.
Also, if i set the box to a fixed height everything is perfect, but if i try to make it expand for some reason the two bottom corner images jump to the top of the box. I'm confused :confused:
If anyone could help i would be very grateful :thumbsup:
Here's the code:-
xhtml
<div id="contenttop_box">
<div id="contenttop_content">content here</div>
<div id="contenttop_tl"></div>
<div id="contenttop_tr"></div>
<div id="contenttop_bl"></div>
<div id="contenttop_br"></div>
</div>
css
#contenttop_box {
clear: both;
width: 960px;
height: 42px;
position: relative;
background-color: #FFFFFF;
background-image: url('images/contenttop-background.png');
}
#contenttop_content {
position: absolute;
padding-left: 15px;
padding-right: 15px;
width: 930px;
}
#contenttop_tl {
background: url('images/contenttop-boxleft_top.png');
width: 11px;
height: 21px;
left: 0px;
top: 0px;
background-repeat: no-repeat;
position: absolute;
}
#contenttop_tr {
background: url('images/contenttop-boxright_top.png');
width: 11px;
height: 21px;
right: 0px;
top: 0px;
background-repeat: no-repeat;
position: absolute;
}
#contenttop_bl {
background: url('images/contenttop-boxleft_bottom.png');
width: 11px;
height: 21px;
left: 0px;
bottom: 0px;
background-repeat: no-repeat;
position: absolute;
}
#contenttop_br {
background: url('images/contenttop-boxright_bottom.png');
width: 11px;
height: 21px;
right: 0px;
bottom: 0px;
background-repeat:no-repeat;
position: absolute;
}
Can anyone help me out with this? I am trying to create a 'rounded corner' expandable box with four corner images. I know there are other methods but the four corners fit in with the rest of the site design and i thought it would be best.
I have the four corner images positioned correctly but i can't get the box to expand and i don't know where i've gone wrong. Its fixed width so only needs to expand down. Instead the text just flows over.
Also, if i set the box to a fixed height everything is perfect, but if i try to make it expand for some reason the two bottom corner images jump to the top of the box. I'm confused :confused:
If anyone could help i would be very grateful :thumbsup:
Here's the code:-
xhtml
<div id="contenttop_box">
<div id="contenttop_content">content here</div>
<div id="contenttop_tl"></div>
<div id="contenttop_tr"></div>
<div id="contenttop_bl"></div>
<div id="contenttop_br"></div>
</div>
css
#contenttop_box {
clear: both;
width: 960px;
height: 42px;
position: relative;
background-color: #FFFFFF;
background-image: url('images/contenttop-background.png');
}
#contenttop_content {
position: absolute;
padding-left: 15px;
padding-right: 15px;
width: 930px;
}
#contenttop_tl {
background: url('images/contenttop-boxleft_top.png');
width: 11px;
height: 21px;
left: 0px;
top: 0px;
background-repeat: no-repeat;
position: absolute;
}
#contenttop_tr {
background: url('images/contenttop-boxright_top.png');
width: 11px;
height: 21px;
right: 0px;
top: 0px;
background-repeat: no-repeat;
position: absolute;
}
#contenttop_bl {
background: url('images/contenttop-boxleft_bottom.png');
width: 11px;
height: 21px;
left: 0px;
bottom: 0px;
background-repeat: no-repeat;
position: absolute;
}
#contenttop_br {
background: url('images/contenttop-boxright_bottom.png');
width: 11px;
height: 21px;
right: 0px;
bottom: 0px;
background-repeat:no-repeat;
position: absolute;
}