Q:

How to attach a div to the side of a div positioned via margin: auto 0;

I have what is a fairly common page layout where the content div is centralised on the page using margin:auto 0. The width of the div itself varies depending on available page width.
I want another div featuring a logo to 'stick' to the outside left hand side of this div (ie no gap or overlap between the two) at a fixed height. What CSS should I use for this?

A:

something like
html:
<html>
    <div id='content'>
        <div id='stickything'>a</div>
    </div>
</html>

css:
html {
    width: 100%;
}

#content {
    position: relative;
    width: 100px;
    height: 600px;
    margin: auto;
    background-color: green;
}

#stickything {
    position: fixed;
    width: 25px;
    height: 30px;
    top: 0px;
    margin-left: -25px;
    background-color: red;
}

http://jsfiddle.net/Kkcnn/

