Float right and width of inline-block element

http://jsfiddle.net/zerkms/4zJyw/1/

In all major browsers, except of IE7, the example works as expected - the parent div has total width of 100px, but in IE7 in some reason it stretches for all width.

And this happens only if v element has float: right

What am I missing?

Answers


The only way I could sort this out was to use position:relative on the parent, and position:absolute; right:0 on the div with the 'v' inside it.


Need Your Help

How to get the auto-generated value from database when inserting new record?

java jdbc

I have table with columns id, name, address, city, state, zip. Here id is auto generated when inserting new record like this: insert into table1(name,address,city,state,zip) values(?,?,?,?,?).

Does cmd always open a new window when you md

java windows cmd mkdir

I am in the midst of a Java project, part of which is calling the Windows cmd to make a directory. My code currently looks like this:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.