html - How to give automatic width to divs inside outer div? -


enter image description herei have divs

<div id='top' >     <div id='top-border' > </div>     <div id='top-menu' > <jdoc:include type="modules" name="top-menu" style="well" /></div> </div> 

and style

#top {     width:100%;     height:40px;     overflow: hidden; } #top-border {     background: url(../images/border.png) repeat-x scroll 0px 18px;     position: relative;     /*width:74%;*/     height:40px;     float:left;     overflow: hidden; } #top-menu {     margin:0;     float:right;     height:40px;     padding-top:6px; } 

what want put content in top-menu shrink automatically depending content. rest width given top-border has background image. when give width top-border works fine. want flexible width not fixed. idea?

you can use table(width:100%) instead of outer div. replace top-border , top-menu use td. top-border td use css "width: 1px; white-space: nowrap;"


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -