Advertisement
Guest User

Untitled

a guest
Apr 24th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.87 KB | None | 0 0
  1. <html>
  2. <head>
  3.     <style>
  4.         .imageContainer {
  5.             background-image:url('calenderPic.jpg');
  6.             background-position:center;
  7.             background-repeat:none;
  8.         }
  9.    
  10.         .textContainerWithinImage {
  11.             position:relative; /* relative to imageContainer */
  12.             margin:auto; /* *should* vertically/horizontally center your text */
  13.             color:white;
  14.             font-weight:bold; /* so text stands out */
  15.         }
  16.     </style>
  17.    
  18.     <script type="PsuedoJavaScript">
  19.         dateOfPost = functionToLoadPostData();
  20.         getElementById('textContainerWithinImage').innerHTML = dateOfPost;
  21.         /* above line replaces any html code currently assigned as far as I remember
  22.             "Text will be shown..." will be replaced with whatever dateOfPost is.*/
  23.     </script>
  24. </head>
  25.  
  26. <body>
  27.     <div id="imageContainer">
  28.         <div id="textContainerWithinImage">Text will be shown on top of image because of CSS rules.</div>
  29.     </div>
  30. </body>
  31.  
  32. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement