Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style>
- .imageContainer {
- background-image:url('calenderPic.jpg');
- background-position:center;
- background-repeat:none;
- }
- .textContainerWithinImage {
- position:relative; /* relative to imageContainer */
- margin:auto; /* *should* vertically/horizontally center your text */
- color:white;
- font-weight:bold; /* so text stands out */
- }
- </style>
- <script type="PsuedoJavaScript">
- dateOfPost = functionToLoadPostData();
- getElementById('textContainerWithinImage').innerHTML = dateOfPost;
- /* above line replaces any html code currently assigned as far as I remember
- "Text will be shown..." will be replaced with whatever dateOfPost is.*/
- </script>
- </head>
- <body>
- <div id="imageContainer">
- <div id="textContainerWithinImage">Text will be shown on top of image because of CSS rules.</div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement