HI,
Did you mean something like this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
.textbox{
width:400px;
border:1px solid #000;
white-space:nowrap;
text-overflow:ellipsis;
padding:5px;
overflow:hidden;
}
.textbox:hover{overflow:visible}
</style>
</head>
<body>
<p class="textbox"> This is a longline of text that would normally stretch outside the confines of the container</p>
</body>
</html>
To use a transition you'd have to have a width for the expanded state which may not be as useful (transitions don't work with auto width).
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
.textbox {
width:410px;
float:left;
}
.textbox p {
padding:5px;
border:1px solid red;
background:#fff;
margin:0;
text-overflow:ellipsis;
white-space:nowrap;
overflow:hidden;
width:400px;
-webkit-transition: width 1s ease-in-out;
-moz-transition: width 1s ease-in-out;
-ms-transition: width 1s ease-in-out;
-o-transition: width 1s ease-in-out;
transition: width 1s ease-in-out;
position:relative;
z-index:2;
}
.textbox p:hover { width:600px }
.test {
float:left;
margin:0 0 0 10px;
height:50px;
width:200px;
background:red;
color:#fff;
text-align:center;
}
</style>
</head>
<body>
<div class="textbox">
<p>This is a longline of text that would normally stretch outside the confines of the container</p>
</div>
<div class="test">Normal content</div>
</body>
</html>
Bookmarks