There seems to be a bug in firefox where if I put anything on the right edge of a container (using text-align or float) it makes the container larger than it should be.

So for example -

```
<div style='width:100px; overflow:auto'>
    <div style='width:50px; float:left;'>Something</div>

    <div style='width:50px; float:right;'>
        <h1 style='text-align:right;'>Title</h1>
    </div>
</div>

```

Creates a scroll bar in firefox, seems to work fine in chrome. Any ideas?
['https://Stackoverflow.com/questions/8899076', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1075814/']
What you're seeing is that the text actually overflows its container, because the painted dimensions of text can be bigger than its layout dimensions. This is particularly visible with italic text, but can happen with any text, especially with subpixel layout and antialiasing.

Chrome doesn't do subpixel layout of any sort, so it's just ignoring the overflowing text.

Your simplest bet is to just style your right float as `overflow:hidden`.
It's behaving as it should. You don't state which versions of Firefox and Chrome you're using, but for me with FF 9.0 and Chrome 16, they behave the same, i.e., the scrollbar appears. It's because your content extends beyond the defined width, and the default value for overflow is "visible", so the h1 in your right-floated div is extending beyond the div's boundaries. If you change your h1 to, say, a p tag, you note that the scrollbar disappears.

Applying a border will illustrate what's happening with the box model (copy/paste to see how the content extends beyond the border):

```
<div style='width:104px; overflow:auto;'>
    <div style='width:50px; float:left; border:1px solid red;'>Something</div>

    <div style='width:50px; float:right; border:1px solid red;'>
        <h1 style='text-align:right;'>Title</h1>
    </div>
</div>

```

So, again, it's behaving as it should. If your content extends beyond its container's width and no overflow value is assigned, overflow defaults to visible and the content shows and "pushes" the boundaries of the container. In this case, since your outer container has overflow:auto, you see a scrollbar.