Div Container Cleanup?

Posted by Nto on Stack Overflow See other posts from Stack Overflow or by Nto
Published on 2010-12-22T21:28:04Z Indexed on 2010/12/22 21:54 UTC
Read the original article Hit count: 131

Filed under:
|
|

Just wondering if its possible to cleanup (less code needed to do the same thing) making this div container. Basically it's just a div with a background image however the top & bottom of the div have rounded graphical corners which is why I have a top, middle, and bottom div inside the container div.

<div class="fbox">
<div class="ftop"></div>
<div class="fmid">

Fullbox Text Goes Here

</div>
<div class="fbot"></div>
</div>

Css:

 .fbox {
  width: 934px;
  margin: 0 auto;
  opacity: 0.70;
 }

 .ftop {
  width: 934px;
  background:url(../images/cb/full.png) no-repeat 0 -34px;
  height: 17px;
  margin:0
 }
 .fmid {
  width: 894px;
  padding-left: 20px;
  padding-right: 20px;
  background:url(../images/cb/fullmid.png) repeat-y;
  min-height: 50px;
  margin:0
 }
 .fbot {
  width: 934px;
  background:url(../images/cb/full.png) no-repeat 0 -17px;
  height: 17px;
  margin:0
 }

Outcome: http://img709.imageshack.us/img709/6681/fbox.jpg

© Stack Overflow or respective owner

Related posts about html

Related posts about css