CSS: Two columns equal height, one fixed, the other fluid width

To save others the time and hassle, here’s my lesson learned: don’t try it.  No matter how close you can get with CSS, after almost a day of searching and experimentation, I eventually fell back to this:

http://giveupandusetables.com/

Why?  At some point in time I had the basics working (in all browsers!), but then I tried to add another div centered in the fluid width column, and that became the new seemingly impossible task.  I can only conclude that no clean CSS can evolve from solving this.  Tables will always look right across all browsers (IE6 included), and will be much easier to manage to get the columns right.  It makes centering the div correctly in the fluid column trivial.  Sad how after several hours, I just ended up with this:

HTML:

<table id=container>
  <tr>
    <td id=sidebar>
    </td>
    <td id=content>
    </td>
  </tr>
</table>

 

CSS:

#container
{
  width: 70%;
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
  padding: 0;
  border-top: 0;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
  border-bottom: 0;
}

#container td
{
  vertical-align: top;
  padding: 0;
  margin: 0;
}

#sidebar
{
  width: 180px;
  border-right: 1px solid #ddd;
}

Mercurial: “hg push” over ssh, remote says “permission denied”

I spent a decent amount of time figuring out this vague error message, so perhaps this post can save someone else some hassle.  I found that many people encountered this problem, posted it on some online forum, but no one gave a clear answer.  So here is one possible solution:

Suppose you set up a remote Mercurial repository, cloned it locally via SSH to your machine and then wished to push your changes to the remote repo.

The commands you ran may look something like this:

hg clone ssh://remoteusername@remoteaddr//dir/to/repo/
[... make some changes ...]
hg pull
hg update
[... make some changes ...]
hg commit [...]
hg push [ssh://remoteusername@remoteaddr//dir/to/repo/]

On the push, if you see:

remote: abort: could not lock repository /dir/to/repo/: Permission denied

you’ll want to check that “remoteusername” has write permissions to not just the “.hg” directory in /dir/to/repo/, but also every file and directory in it.  If not, you’ll want to add to the owner group or change the owner of the .hg directory and its contents recursively to “remoteusername” (e.g. using “chown -R”).  For obvious reasons, you don’t want to make the directory and its contents globally writable (e.g. don’t “chmod 777”).

I got into this bind by initializing the remote repository under sudo such that the owner was root, and not the username I was using for SSH.