Table Layout using CSS -


i trying use table layout div. fine config. but, there problem setting min-width. trying use in forms. here demo.

when, divleft label size gets increases, should not wrap next line until maindiv width reaches limit. means setting left div min-width 25% , if left div content grows, should extend width fit content until reaches main div width. pls suggest me how can this.

css code

.divmain { display: table-row; padding: 12px; } .divleft { display: table-cell; vertical-align: top; padding: 1px; width: 25%; } .divright { display: table-cell; vertical-align: top; padding: 1px; } 

add 2 property

.divmain { width:100% }  .divleft { min-width: 25%; } 

note : have changed css declaration : see demo

update

note: have missed divright class on first row in updated demo. see

.divleft {     display: table-cell;     vertical-align: top;     padding: 1px;     min-width: 35%; } .divright {     display: table-cell;     vertical-align: top;     padding: 1px; } 

updated demo


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -