html - display :inline-block is not working without DOCTYPE in IE -


want data block width , height must adjusted inside content of data block automatically.i did putting content inside div tag display style inline-block. working fine in browsers if doctype tag present. if doctype not there,it not working in ie(the div width adjusted width of browser).but works in other browsers. there solution or alternative.... ? can body please me....

here piece of code

<html>  <head>   <title> new document </title>   <meta name="generator" content="editplus">   <meta name="author" content="">   <meta name="keywords" content="">   <meta name="description" content="">   <style>    .multiselectmenu{      border:1px solid black;      display:inline-block;     }    .multiselectmenu ul{      margin:0px;      padding:0px;    }   .multiselectmenu ul li{     list-style:none;     background:#abc4c9;     border-bottom:1px solid #354e53;     padding:2px 4px 2px 4px;     cursor:pointer;   }   </style>  </head>   <body>    <div class="multiselectmenu" >      <ul>        <li>telugu</li>        <li>hindi</li>        <li>english</li>        <li>marathi</li>        <li>kannada</li>        <li>malayalam</li>      </ul>   </div>  </body> </html> 

add

   .multiselectmenu { float: left; } 

and set clear: left on element right after div element.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -