On 11/12/10 8:02 PM, John wrote:
David;

A brief question if you have time..you helped me with this code the other day. Why does #bar need top: 0; left:0?

left: 0 I get, but isn't top: 0 at the top of the very page itself? why can't that black bar have the same code, except for the z-index, as the bar that's on top of it?

Thank you,

John

here's the code:


<!doctype html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>stuff</title>
<style type="text/css">
html, body {
    background : #fff;
    color : #000;
    margin : 0;
}

body {
    font : 100% arial, sans-serif;
}

p {
    color : #fff;
    margin : 0;
}

#header {
    position : relative;
    width : 750px;
    height : 100px;
    background : #601603;
    margin : 3em auto 0 auto;
    border-left : 15px solid fuchsia;
    z-index : 1;
}

#bar {
    position : fixed;
    top : 0;
    left : 0;
    margin-top : 3em;
    width : 750px;
    height : 100px;
    background : #000;
}


</style>

</head>

<body>

<div id="header">
<p>header</p>
</div>

<div id="bar">
<p>b<br />a<br />r</p>
</div>
</body>
</html>


Dunno. But guessing at is always a pleasure...:-) .
<http://chelseacreekstudio.com/ca/cssd/13.html>
Send clues.

thanks, Dave! Your example is what I am aiming for. Claude pointed out a number of errors in my code which could explain why things weren't behaving properly.

I am probably looking at weeks of tough climbing to learn what I need to learn about writing well-behaved code...

I can learn from your example; thanks for posting it!

John








I leave matters of  profound nature for others to wrestle with and answer.

Best,
~d



--
:: desktop and mobile ::
http://chelseacreekstudio.com/

______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to