#aretz {wrapping.css (line 48)
background-color:#CC9966;
clear:both;
color:#FFFF99;
height:412px;
left:50%;
margin:0pt 0pt 0pt -460px;
position:absolute;
top:0;
width:918px;
z-index:3;
}
You need to add a position:absolute; for the z-index to take effect.
Adding a top:0; will ensure it is pulled out of the containing DIV to
the top of the page.
Left:50% centers the left edge of the DIV, then use a negative margin to
centre it (I found -460px is about right)
Then you can add a top margin to get it as far down the page as you
need. Or, just use the top attribute - top:50px; or whatever you need.
zalel wrote:
> I am trying to write CSS to create a page like the one in the first
> link. I thought that using the z-index attribute would give the
> results I want. So far, it doesn't work. Am I using the attribute
> incorrectly?
>
> 1. Adobe Fireworks layout. http://www.signifydesign.com/worshipandstudy/
>
> 2a. Unsuccessful html page. This is my second try at the CSS for the
> page. http://www.signifydesign.com/worshipandstudy/index_z-index_01.html
> 2b. Link to the CSS for the page.
> http://www.signifydesign.com/worshipandstudy/css/wrapping.css
>
> 3a. First html page I made for this layout. The bottoms of the divs do
> not line up. Also, the alignments will be worse when viewers enlarge
> the type. http://www.signifydesign.com/worshipandstudy/index1.html
> 3b. Link to the CSS for the page.
> http://www.signifydesign.com/worshipandstudy/css/was_styles_04.css
>
> Thanks!
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
--
You received this because you are subscribed to the "Design the Web with CSS"
at Google groups.
To post: [email protected]
To unsubscribe: [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---