• Follow me on:

Monday, July 25, 2011

CSS min-width not working

Have you ever face this problem, CSS min-width not working.  Many of you may know this but this one's for those who don't.  Well, today I had a requirement of a div which should increase in width depending on the content in it.  The images are to placed inside that div sided by side. 

       I thought min-width property will be enough, but it wasn't working.  So as usual switch to Google, but the results I found wasn't the solution for my requirement.  After a bit of CSS storming I came up with this solution.  If we use display:inline-table; to the div to which we want to assign min-width, it will work.

div{
 display : inline-table;
min-width : 200px;
}

Share your solutions.





2 comments:

  1. ty man) u rly helped me, but somehow with totally different problem-)) still by some will i found myself here, you ROCK MAN-)

    ReplyDelete

All Rights Reserved Jaydharphics Click To Mail Me (+91 9564 5592 84)