CSS/div z-index hack help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • obanite
    New Member
    • Oct 2007
    • 5

    CSS/div z-index hack help

    Hi,

    First of all, I know this is very hacky!

    I'm just wondering, is it possible through CSS (or maybe JavaScript) to make a div's background appear "on top" of its own content?

    I have a div, with some arbitrary sized, arbitrary content inside it. I want to make something the same size as the content appear over the top of it. Any ideas?

    Thanks!
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    Not possible. .

    Comment

    • artistsamir
      New Member
      • Nov 2007
      • 1

      #3
      Need to give absolute position to DIV

      <div class="up_box"> A box</div>
      <div class="down_box ">A box</div>

      .up_box { position:absolu te; z-index:5; background:#fc0 ; }
      .down_box { background:#555 ; }

      Thanks

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        Not what he wants. .

        Comment

        Working...