
Originally Posted by
321web
Did I miss something?
Are you saying to use that instead of float?
Hi,
Yes, Paul was saying use inline-block instead of a float. An inline-block without a width will shrinkwrap just like a widthless float.
Yes you missed something, IE6/7 need the "inline reset" in another selector lower down in the cascade.
Like so -
Code:
<style>
div.select {
display:inline-block;
white-space:nowrap;
color:red;
}
* html div.select {display:inline;}/*IE6 inline-block trigger*/
*+html div.select {display:inline;}/*IE7 inline-block trigger*/
td,th {
border:1px solid #000;
padding:4px;
}
</style>
Or you could use an IE CC if you don't like the hacks -
Code HTML4Strict:
<head>
<title>Test</title>
<style>
div.select {
display:inline-block;
white-space:nowrap;
color:red;
}
td,th {
border:1px solid #000;
padding:4px;
}
</style>
<!--[if lt IE 8]>
<style type="text/css">
div.select{
display:inline;
}
</style>
<![endif]-->
</head>
<body>
Bookmarks