Jump to content

word-wrap:break-word; not working in IE7


K-dot2011
 Share

Recommended Posts

could someone help me solve this problem?here is the code:

.nwProductInfo .product-nw {display:block;height:30px;overflow:hidden;white-space:normal; /* fix for word wrapping in IE */width:125px;word-wrap:break-word;/* break-word:break-all; */float:left;text-align:left;background:none;font-size:12px;font-weight:300;}

It wraps fine in FF 3.6, but it does not work in IE7Thanks

Link to comment
Share on other sites

I'm using overflow:scroll now. However, I'm only getting a vertical scroll bar, not horizontal and vertical. The text extends outside the box horizontally. I think this may be happening due to hierarchy, but I'm not sure. Would I be correct to assume that?
I'm not sure what you mean by "hierarchy". Can you post your relevant HTML and CSS?
Link to comment
Share on other sites

Sorry, hierarchy = nodes (parent, child) The css I have may not help since I am working in an iframe (overlay) and don't have access to the full page code. So I'm not sure if maybe there is an overflow property set in a parent node that is over-riding my code in the .history-I class. I checked the .shortDescription class, but there was no overflow property listed. The overlay is written in javascript. I don't know if this will help ....CSS: (.history-I)

.shortDescrptn .history-I{	background: none repeat scroll 0 0 transparent;	display: block;	float: left;	font-size: 12px;	font-weight: 300;	height: 50px;	overflow: scroll; /* tried 'overflow:auto', 'overflow-y:auto' nothing has worked to create the correct scroll for IE8 */	text-align: left;	white-space: normal;	width: 125px;

HTML snippet:

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>History I Required Materials</title></head><body><div id="historyIShortDescription"> 	 <form name="rqItems" id="formRqdItems" class="rqdItems">		<div id="displayRqdItems"> 		  <script language="JavaScript" type="text/javascript">			  var value = {"RequiredItemGroups":[{"catGroupId":901,"productDetails":[{"CatEntryId":"936","ItemImage":"images/155088.jpg","ProductName":"Introduction to World History","Description":"Hard Cover, 482 pages","Price":{"ListPrice":"59.97"},"Productavailability":["Online Only"]},{"CatEntryId":"767","ItemImage":"images/1550878.jpg","ProductName":"Introduction to Ancient Religion and Cultural Beliefs","Description":"Hard Cover, 386 pages","Price":{},"Productavailability":[]},{"CatEntryId":"653","ItemImage":"images/155088.jpg","ProductName":"Creating Maps I","Description":"Soft Cover, 59 pages","Price":{},"Productavailability":[]}]}]};			parseRequiredItemResponse();		  </script>  		</div> </form></div></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...