CSS min-width in IE6, 7, and 8
So it turns out that the necessary hack for getting min-width to work in all browsers isn't as ugly as many make it out to be.
All I had to do was add CSS for a div within the largeCell
and add an empty div at the end of the cell. The div is only 1px tall, so it doesn't really make the cell look larger than it should be.
<style type="text/css">
table.dataTable td {
white-space: nowrap;
}
table.dataTable td.largeCell {
white-space: normal;
min-width: 300px;
}
table.dataTable td.largeCell div {
margin: 0px 0px 0px 0px;
height: 1px;
width: 300px;
}
</style>
<table class="dataTable">
<tr>
<td>ID</td>
<td>Date</td>
<td>Title</td>
<td class="largeCell">A large amount of data like a description that could
span several lines within this cell.
<div></div>
</td>
<td>Link</td>
</tr>
</table>
Internet explorer 7 overflow using min-width
I fixed IT
Thanks to : http://snook.ca/archives/html_and_css/position_relative_overflow_ie
i put position:relative to my #wrapper
(the element that has the overflow:hidden.)
thanks everyone who tried :)
How to make css max width in IE6 and 7?
- The max-height property is supported in IE7: http://www.w3schools.com/cssref/pr_dim_max-height.asp , and you can use IE7 test it by this link.
IE6 and earlier versions do not support the max-height property. But you can use CSS to hack it:
img {
max-height: 800px;
_height:expression(this.scrollHeight > 800 ? "800px" : "auto"); /* sets max-height for IE6 */
max-width: 600px;
_width:expression(this.scrollWidth > 600 ? "600px" : "auto"); /* sets max-width for IE6 */
}
2.1 Solve it by jQuery:
if($.browser.msie&&($.browser.version == "6.0")&&!$.support.style){
$("img").each(function(){
if($(this)[0].scrollHeight>800)
$(this).css({"height":"800px","overflow":"hidden"});
});
}
2012.11.27 update:
img{
min-height:800px;height:auto !important;height:800px;
min-width:600px;width:auto !important;width:600px;
}
How to emulate min-width in IE8
http://jsfiddle.net/3htmA/
IE8. your code works perfect.
Issue with box-sizing border-box and min-width in IE 9
Hi came across your post when Googling for a similar issue with IE 8, although IE 8 supports box-sizing and min-height/width, from my tests, it seems IE 8 ignores border-box when using min-height/width on the same element
E.g.
#box {
min-height: 20px;
padding:4px;
box-sizing:border-box;
}
IE 8 height = 28px, Chrome 20 height = 20px;
Solution using css browser selectors http://rafael.adm.br/css_browser_selector/
#box {
min-height: 20px;
padding:4px;
box-sizing:border-box;
}
.ie8 #box, .ie9 #box {
min-height: 12px;
padding:4px;
}
Related Topics
Why Doesn't Font Awesome Work in My Shadow Dom
What Are Most Useful Media="Print" Specific, Cross Browser Compatible CSS Properties
Firefox Issue with Display:Absolute in a Table Cell
Box Shadows on Multiple Elements at Same Level But Without Overlap
Sidemenu Background-Color in Ionic-V4
Codeigniter - Simple Base_Url Question
What Happens When the Browser Doesn't Support a CSS Pseudo-Class
CSS Flex, How to Display One Item on First Line and Two on the Next Line
Webkit Border-Radius and Overflow Bug When Using Any Animation/Transition
Ie & Firefox - Custom Drop Down Could Not Remove Native Arrows
Why Does SASS Prepend an Incorrect @Charset Rule
Google Custom Search (Csev2) Help on Styling
CSS Object-Fit Cover Is Stretching a Particular Image in Chrome on MAC
How to Use Skew Only in the Parent Element
Forward Slash/In CSS Border Radius Syntax