So I'm trying to build a new registration page on my site. The box was all 1 image with text and forms put on it.
I want to make the height change depending on the content (without stretching the image. So I cut off the top/bottom parts of the box, a small bit of the middle and forced it to repeat. This works almost perfectly
Now, the problem...There is a small gap inbetween .box and .boxbottom but I can't see where it would come from at all?
margin: auto;
on all divs
float: left;
helps a little bit but they weren't perfectly aligned
Here are the divs
.boxwrapper{
width: 530px;
margin: auto;
position: relative;
top:0;
bottom: 0;
left: 0;
right: 0;
}
.boxtop{
background-image: url(images/boxrepeattop.png);
background-repeat: no-repeat;
margin: auto;
width: 100%;
height: 45px;
}
.box{
background-image: url(images/boxrepeat.png);
margin: auto;
width: 100%;
height: auto;
}
.boxbottom{
background-image: url(images/boxrepeatbottom.png);
background-repeat: no-repeat;
margin: auto;
width: 100%;
height: 45px;
}
and here's the HTML:
<div class="boxwrapper">
<div class="boxtop">
</div>
<div class="box">
<div class="contentbox">
</div>
</div
<div class="boxbottom">
</div>
</div>
Just like .boxtop and .box fit snuggly together, I'd like .box and .boxbottom to do the same