troubleshooting Question

css div position over jpg

Avatar of worldfear
worldfear asked on
CSS
1 Comment1 Solution702 ViewsLast Modified:
hello, i want the word "work" in the code below to show up on top of the image.  it doesnt as things are now, it is behind the image.  the z-index manipulation doesnt seem to change much.
the html
 <div id="topnavcoverdiv"> work
    <div id="topnavdiv">    
        <asp:Image ID="Image1" runat="server" CssClass="topnavimg"  ImageUrl="images/nav.jpg" />
    </div>
   </div>
    <div id="toptextdiv">
    <asp:ContentPlaceHolder ID="toptextcontent" runat="server">
    </asp:ContentPlaceHolder>
    </div>

the css:
#topnavdiv {
      width: 799px;
      height: 18px;
      padding: 0px;
      position:absolute;
      top:0px;
    left: 1px;
    z-index:0;
}

.topnavimg {
      width: 799px;
      padding: 0px;
      position:absolute;
      top:0px;
    left: 1px;
    z-index:0;
}

#topnavcoverdiv {
      width: 80px;
      height: 21px;
      padding: 0px;
      position:absolute;
      top:128px;
    left: -1px;
    z-index:2;
    text-align:center;
    vertical-align:super;;
    border:solid 1px black;
}

#topnavdiv ul {
      height: 20px;
      padding:0;
      margin:0;
      float: left;
}

#topnavdiv li {
      padding:0;
      margin-top:0;
      margin-left:0;
      float: left;
      list-style-type: none;
      display:block;
}

#toptextdiv {
border-style: none;
    border-color: inherit;
    border-width: medium;
width: 799px;
height:21px;
    margin: 1px 1px 1px 1px;
    position:absolute;
top:149px;
left:0px;
    z-index:2;
     background-color:White;
}

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros