html - Table beside a floating image -


i'm trying accomplish thought simple, seems when comes css, never know!

i have image float left. beside it, have title , under title, still besides image, want display table taking remaining width. in ie , chrome, table ends under image while in ff, takes more 100% (an horizontal scroll bar displayed). ff gives result closer want, don't want scrollbar.

here code tried make work using w3school "try it" editor (http://www.w3schools.com/css/tryit.asp?filename=trycss_float)

<html>     <head>         <style type="text/css">             h1{                 font-size:1em;             }             img              {                 float:left;             }             .field{                 width:100%             }             </style>     </head>      <body>         <img src="logocss.gif" width="95" height="84" />         <div class="content">             <h1>this title</h1>             <form>                 <table width="100%">                     <tr>                         <td><input type="text" class="field"/></td>                     </tr>                 </table>             </form>         </div>     </body>     </html> 

i know structure complex simple form, forms automatically generated php script i'd keep way.

thanks help!

because have floated image taking horizontal space .content div why extended table. .content div not aware of floated image width. can offset placing margin @ least width of image on .content div.

.content  {     margin-left: 95px;  } 

fiddle


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -