placing text on top of an image with CSS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • caesarkim
    New Member
    • Sep 2008
    • 2

    placing text on top of an image with CSS

    I have code like this. I want "Hello World" to be placed on top of 'big_icon.gif' image which is width: 179 height: 35px. The following code doesn't work with firefox and IE. The image appears, but the image is located below the text.

    Does anybody know what is wrong with this code?
    Code:
    <style>
    .header1 {
      background-image:url("images/big_icon.gif");
      background-attachment: fixed;
      background-repeat: no-repeat;
      background-color: #CCCCCC;
      height: 35px;
      margin-top: 0;
      text-align:
    }
    </style>
    
    <div class="header1">Hello World</div>
    Last edited by eWish; Sep 20 '08, 02:55 AM. Reason: Please use code tags
  • David Laakso
    Recognized Expert Contributor
    • Aug 2008
    • 397

    #2
    Are you attempting to do somethig like this?
    hello world!
    CSS embedded in head of document (the image is 179 by 35px).
    Cursory checked in IE/6, IE/7, and compliant browsers.
    HTH

    Comment

    Working...