Guest User

Untitled

a guest
Jul 15th, 2012
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. How to center using margin: auto while keeping non-centered divs from moving off page on browser resize
  2. #TopWrapper
  3. {
  4. padding: 0px 200px;
  5. }
  6.  
  7.  
  8. #TopMiddleWrapper
  9. {
  10. width: 826px;
  11. margin: 0px auto;
  12. }
  13.  
  14. #TopWrapper {
  15. width: 100%;
  16. padding: 0px 200px;
  17. float: left;
  18. min-height: 450px;
  19. height: auto !important;
  20. height: 450px;
  21. background: #7698b8 url(../Images/body.gif) repeat-x 0 0;
  22. }
  23.  
  24. #PhotoWrapper {
  25. width: 916px;
  26. margin: 0 auto;
  27. }
  28.  
  29. #TopMiddleWrapper {
  30. width: 916px;
  31. height: 100%;
  32. margin-left: -124px;
  33. min-height: 580px;
  34. height: auto !important;
  35. height: 580px;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment