code_junkie

positioning three divs with css

Nov 11th, 2011
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #menu {
  2. position:absolute;
  3. top:0;
  4. left:0;
  5. width:100px;
  6. }
  7. #content, #login {
  8. margin-left:120px;
  9. }
  10.  
  11. #content, #login {
  12. float:right;
  13. clear:right
  14. }
  15.  
  16. <html>
  17. <head>
  18. <title>test</title>
  19. <style>
  20. #login {
  21. float: right;
  22. width: 400px;
  23. border: 1px solid #f00;
  24. }
  25. #content {
  26. clear: right;
  27. float: right;
  28. width: 400px;
  29. border: 1px solid #f00;
  30. }
  31. #menu {
  32. float:left;
  33. width: 400px;
  34. border: 1px solid #f00;
  35. }
  36. </style>
  37. </head>
  38. <body>
  39. <div id="login">Login</div>
  40. <div id="content">Content</div>
  41. <div id="menu">Menu</div>
  42. </body>
  43. </html>
Add Comment
Please, Sign In to add comment