The codes can be found here:
http://www.w3schools.com/css/tryit.asp?filename=trycss_float_elements
&l
first see this demo
Notice the border given to the images,in the last case, the border has been set inline and it shows the inline border-color but in case of the width, its taking the one set in css and not the inline.
So as mentioned in the link provided by the BOLTCLOCK, i assume it all depends on the selector's specificity