2009
Nov
22




Liquid PNG 8 Round Corners

HTML

HTML Markup
  1. <div id="wrapperDiv" class="wrapper">
  2. <div class="top-left"></div>
  3. <div class="top-right"></div>
  4. <div class="top-center"><div class="hack-ie6"></div></div>
  5. <div id="bodyCenterDiv" class="body-center">
  6. <div class="contents">contents right here</div>
  7. </div>
  8. <div class="bottom-left"></div>
  9. <div class="bottom-right"></div>
  10. <div class="bottom-center"><div class="hack-ie6"></div></div>
  11. </div>
CSS
  1. .wrapper {
  2. width: 500px;
  3. margin: 10px auto;
  4. }
  5. .wrapper .top-left, .wrapper .top-center, .wrapper .top-right,
  6. .wrapper .bottom-left, .wrapper .bottom-center, .wrapper .bottom-right {
  7. background: transparent url(../images/png8.png) left top scroll no-repeat;
  8. overflow: hidden;
  9. }
  10. .wrapper .top-left {
  11. width: 15px;
  12. height: 46px;
  13. background-position: left top;
  14. float: left;
  15. }
  16. .wrapper .top-center {
  17. height: 46px;
  18. background-position: -15px top;
  19. _float: left;
  20. }
  21. .wrapper .top-right {
  22. width: 15px;
  23. height: 46px;
  24. background-position: right top;
  25. float: right;
  26. }
  27. .wrapper .body-center {
  28. width: 496px;
  29. background-color: #fff;
  30. border-left: 2px solid #333;
  31. border-right: 2px solid #333;
  32. }
  33. .wrapper .bottom-left {
  34. width: 15px;
  35. height: 31px;
  36. background-position: left -46px;
  37. float: left;
  38. }
  39. .wrapper .bottom-center {
  40. height: 31px;
  41. background-position: -15px -46px;
  42. _float: left;
  43. }
  44. .wrapper .bottom-right {
  45. width: 15px;
  46. height: 31px;
  47. background-position: right -46px;
  48. float: right;
  49. }
  50. *html .wrapper .hack-ie6 {
  51. width: 100%;
  52. overflow: hidden;
  53. }

View Demo

Liquid PNG 24 Round Corners with Outer Shadows

HTML

HTML Markup
  1. <div id="wrapperDiv" class="wrapper">
  2. <div class="top-left"></div>
  3. <div class="top-right"></div>
  4. <div class="top-center"><div class="hack-ie6"></div></div>
  5. <div class="body-left">
  6. <div class="body-right">
  7. <div id="bodyLeftDiv" class="body-left-hack-ie6"></div>
  8. <div id="bodyRightDiv" class="body-right-hack-ie6"></div>
  9. <div id="bodyCenterDiv" class="body-center">
  10. <div class="contents">contents right here</div>
  11. </div>
  12. </div>
  13. </div>
  14. <div class="bottom-left"></div>
  15. <div class="bottom-right"></div>
  16. <div class="bottom-center"><div class="hack-ie6"></div></div>
  17. </div>

CSS

CSS
  1. .wrapper {
  2. width: 500px;
  3. margin: 10px auto;
  4. }
  5. .wrapper .top-left {
  6. width: 40px;
  7. height: 40px;
  8. background: transparent url(../images/top-left-png24.png) left top scroll no-repeat;
  9. float: left;
  10. }
  11. .wrapper .top-center {
  12. height: 40px;
  13. background: transparent url(../images/top-center-png24.png) left top scroll repeat-x;
  14. _float: left;
  15. overflow: hidden;
  16. }
  17. .wrapper .top-right {
  18. width: 40px;
  19. height: 40px;
  20. background: transparent url(../images/top-right-png24.png) left top scroll no-repeat;
  21. float: right;
  22. }
  23. .wrapper .body-left {
  24. width: 100%;
  25. background: transparent url(../images/body-left-png24.png) left top scroll repeat-y;
  26. }
  27. .wrapper .body-center {
  28. background-color: #e9f2f5;
  29. margin: 0 40px;
  30. }
  31. .wrapper .body-right {
  32. width: 100%;
  33. background: transparent url(../images/body-right-png24.png) 100% top scroll repeat-y;
  34. }
  35. .wrapper .bottom-left {
  36. width: 40px;
  37. height: 40px;
  38. background: transparent url(../images/bottom-left-png24.png) left top scroll no-repeat;
  39. float: left;
  40. }
  41. .wrapper .bottom-center {
  42. height: 40px;
  43. background: transparent url(../images/bottom-center-png24.png) left top scroll repeat-x;
  44. _float: left;
  45. overflow: hidden;
  46. }
  47. .wrapper .bottom-right {
  48. width: 40px;
  49. height: 40px;
  50. background: transparent url(../images/bottom-right-png24.png) left top scroll no-repeat;
  51. float: right;
  52. }

CSS For IE6

CSS
  1. *html .wrapper .hack-ie6 {
  2. width: 100%;
  3. }
  4. *html .wrapper .top-left {
  5. background: none;
  6. filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/top-left-png24.png', sizingMethod='image');
  7. }
  8. *html .wrapper .top-center {
  9. background: none;
  10. filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/top-center-png24.png', sizingMethod='scale');
  11. }
  12. *html .wrapper .top-right {
  13. background: none;
  14. filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/top-right-png24.png', sizingMethod='image');
  15. }
  16. *html .wrapper .body-left, *html .wrapper .body-right {
  17. background: none;
  18. }
  19. *html .wrapper .body-center {
  20. width: expression(document.getElementById('wrapperDiv').offsetWidth - document.getElementById('bodyLeftDiv').offsetWidth - document.getElementById('bodyRightDiv').offsetWidth + "px");
  21. margin: 0 40px
  22. }
  23. *html .wrapper .body-left-hack-ie6 {
  24. width: 40px;
  25. height: expression(document.getElementById('bodyCenterDiv').offsetHeight + "px");
  26. filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/body-left-png24.png', sizingMethod='scale');
  27. margin: 0 -40px 0 0
  28. float:left
  29. }
  30. *html .wrapper .body-right-hack-ie6 {
  31. width: 40px;
  32. height: expression(document.getElementById('bodyCenterDiv').offsetHeight + "px");
  33. filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/body-right-png24.png', sizingMethod='scale');
  34. margin: 0 0 0 -40px
  35. float:right
  36. }
  37. *html .wrapper .bottom-left {
  38. background: none;
  39. filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/bottom-left-png24.png', sizingMethod='image');
  40. }
  41. *html .wrapper .bottom-center {
  42. background: none;
  43. filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/bottom-center-png24.png', sizingMethod='scale');
  44. }
  45. *html .wrapper .bottom-right {
  46. background: none;
  47. filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/bottom-right-png24.png', sizingMethod='image');
  48. }

View Demo

Related Posts


回應 (Leave a comment)