code_junkie

Relative positioning in Safari

Nov 12th, 2011
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. .progressImage
  2. {
  3. position:relative;
  4. top:50%;
  5. }
  6.  
  7. .progressPanel
  8. {
  9. height:100%;
  10. width:100%;
  11. text-align:center;
  12. display:none;
  13. }
  14.  
  15. <asp:Panel ID="pnlProgress" runat="server" CssClass="progressPanel">
  16. <asp:Image ID="Image1" runat="server" CssClass="progressImage" ImageUrl="~/Images/Icons/loading.gif" />
  17. </asp:Panel>
  18.  
  19. .progressPanel
  20. {
  21. height:100%;
  22. width:100%;
  23. position:relative;
  24. }
  25.  
  26. .progressImage
  27. {
  28. position:absolute;
  29. top:50%;
  30. left:50%;
  31. }
  32.  
  33. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  34. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  35. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  36. <head>
  37. <title>Test</title>
  38. <style type="text/css">
  39. body {
  40. height:700px;
  41. }
  42. .progressImage {
  43. position:absolute;
  44. top:50%;
  45. left:50%;
  46. margin-left:-16px;
  47. margin-top:-16px;
  48. }
  49.  
  50. .progressPanel {
  51. position:relative;
  52. height:100%;
  53. width:100%;
  54. text-align:center;
  55. background:red;
  56. }
  57. </style>
  58. </head>
  59. <body>
  60. <div class="progressPanel"><img class="progressImage" src="pic.jpg"/></div>
  61. </body>
  62. </html>
  63.  
  64. .progressPanel
  65. {
  66. height:100%;
  67. width:100%;
  68. text-align:center;
  69. display:none;
  70. position: relative;
  71. }
  72.  
  73. background: url('path/to/image.gif') no-repeat center middle;
Add Comment
Please, Sign In to add comment