html - How to do 3 divs in-line and last with auto width? -


i want single line, text + text + central bar (must fill remaining width).

i tried this:

html:

    <div class="title-cont">     <div class="title-num">1.</div>     <div class="title-text">title section</div>     <div class="title-bar"></div>     </div> 

css:

.title-cont { float:left; clear:left; width:600px; white-space:nowrap; overflow:hidden; } .title-num { float:left; font-size:20px; color:red; } .title-text { float:left; font-size:16px; color:blue; } .title-bar { float:left; width:100%; height:5px; background:red; } 

url: http://fiddle.jshell.net/5bt4s/2/

try this

.title-cont { float:left; width:600px; white-space:nowrap; overflow:hidden; } .title-num { float:left; font-size:20px; color:red; } .title-text { float:left; font-size:16px; color:blue; } .title-bar {display:inline-block;width:100%; height:5px; background:red; } 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -