html - Adjust divider width if image is present -


i have divider float left property housing text, divider float right housing image. total width of both dividers should no bigger 735 , reserving 200 image. how can adjust width of first divider 535 if image present , 735 if image hidden?

<div style="width:735px">     <div style="float:left; width=????????>         text here     </div>     <div style="float:right">         <img src="../images/biteme.png" alt="" style="height:auto; width:auto; max-height:115px; max-width:200px; display:block" />     </div> </div> 

to in pure css easy, you'd need different approach. float 1 div , other automatically take remaining space

demo http://jsfiddle.net/kevinphpkevin/gaur5/

img {     width: auto;     height: auto;     max-width: 200px;     display: block; } 

set img css display: none , see other div takes remaining space.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -