Floats are okay, but problematic with IE 6 & 7.
I’d prefer using the following on the inner div:
margin-left: auto;
margin-right: 0;
See the IE Double Margin Bug for clarification on why.
More Related Contents:
- Align elements side by side
- Child inside parent with min-height: 100% not inheriting height
- Select elements by attribute in CSS
- How to prevent long words from breaking my div?
- How can I center into a div?
- Canvas has white space at the bottom and scrolls too far
- How to make a floated div 100% height of its parent?
- Disable webkit’s spin buttons on input type=”number”?
- How do I force a DIV block to extend to the bottom of a page even if it has no content?
- How to make fixed header table inside scrollable div?
- Actual table Vs. Div table
- Align two inline-blocks left and right on same line
- Is it valid to have paragraph elements inside of a heading tag in HTML5 (P inside H1)?
- Proper way to apply CSS to HTML5 custom elements
- blur of part of Background image with css
- Adjacent divs with angled borders? [duplicate]
- Two Divs next to each other, that then stack with responsive change
- Make HTML5 video poster be same size as video itself
- How to align a div to the top of its parent but keeping its inline-block behaviour?
- Using background-attachment:fixed in safari on the ipad
- Overflow to left instead of right
- HTML / CSS Popup div on text click [closed]
- Custom tags… why not?
- How to push a footer to the bottom of page when content is short or missing?
- Why box-sizing is not working with width/height attribute on canvas element?
- How do I make text bold in HTML?
- Center fixed div with dynamic width (CSS)
- Is it acceptable to use tables for forms? Or is it still more correct to use divs?
- Change an HTML input’s placeholder color with CSS
- Stacking DIVs on top of each other?