tags:

views:

232

answers:

1

Hi, im trying to position a div that contains a logo(the one in orange, see image) on top of the wrapper div, but a little outside of it.

I've tried with absolute position, but everytime i resize the browser(for example to 800x600), the wrapper div moves around...

Here is the code, and an image for help to understand what im trying to explain:

<style type="text/css">
   #wrapper{width:958px; margin: 0 auto -47px;min-height:950px;}
   #content {
   background-color:#306;
   width:100%; 
   overflow: auto;
   min-height:650px;
   }
   #imagem{position:absolute;top:0;padding-left:200px;width:451px;height:108px;}
</style>
</head>

<body>

  <div id="imagem"><img src="logo.png" /></div>

    <div id="wrapper">
<div id="content">
  <p>teste</p>
     </div>
    </div>
  </body>

alt text

Thank u in advance

+2  A: 

Try using negative margins instead:

#imagem { margin-left: -50px; }

This should be put inside the wrapper instead of outside it. It'll solve the problems of things overlapping it.

cletus
Thank u! it worked like a charm
dutraveller