Click here to Skip to main content
15,907,687 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
XML
<html><head></head><body onLoad="myFunction()"><style>body {font:14px arial;margin-left:0;margin-top:0;margin-right:0;word-wrap:break-word;text-overflow: ellipsis;overflow: hidden;white-space: wrap;}"</style><div class="greenBorder" style="display: table; height: 100%; #position: relative; overflow: hidden;"><div style=" #position: absolute; #top: 50%;display: table-cell; vertical-align: middle;"><img src="double-quote-up@2x~iphone.png" width="14" height="14" style="display:inline-block;float:left;" /><span id="longText" style="max-width:200px;word-wrap: break-word;word-break:break-all;display:inline-block;">1111111111111111111111111111111111111111111122222222222333333333333333333344444444444</span><img src="double-quote-down@2x~iphone.png" width="14" height="14" style="display:inline-block" /></div></div></body></html>


I want somthing like this structure :-

XML
<img_quote_start>a_long_string_here_a_long_string_here_a_long_st
  a_long_string_here_a_long_string_here_a_long_string_here_a_lo
  ng_string_here_a_long_string_here_a_long_string_here_a_long_s
  tring_here<img_quote_end>


Thanks for your answers.
Posted
Updated 17-Mar-13 21:43pm
v2

1 solution

Hello Ravi,

Add width:200px to span. It should work. A very good demo is available here [^]. May be following example can help you.

HTML
<!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="X-UA-Compatible" content="IE=Edge"></meta>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
<meta name="author" content="Prasad P. Khandekar"></meta>
<meta http-equiv="Expires" content="0"></meta>
<meta http-equiv="Pragma" content="no-cache"></meta>
<meta http-equiv="Cache-Control" content="no-cache"></meta>
<meta http-equiv="Pragma-directive" content="no-cache"></meta>
<meta http-equiv="cache-directive" content="no-cache"></meta>
<title>Test Page</title>
<style type="text/css">
body {
    font:14px arial;
    margin:0;
    overflow: hidden;
    word-wrap:break-word;
    white-space: wrap;
    text-overflow: ellipsis;
}
.greenBorder {
    border: 1px solid #008000;
}
.quotestart {
    width:16px;
    vertical-align: top;
    background: transparent top left no-repeat scroll url('images/lq.png');
}
.quoteend {
    width: 16px;
    vertical-align: bottom;
    background: transparent top left no-repeat scroll url('images/rq.png');
}
</style>
</head>
<body>
    <div class="greenBorder" style="display: table; height: 100%; removed: relative; overflow: hidden;">
        <div style=" #removed: absolute; #removed 50%;display: table-cell; vertical-align: middle;">
            <span id="longText" style="max-width:200px;width:200px;word-wrap: break-word;word-break:break-all;display:inline-block;">
                <img src="images/lq.png"/>
               1111111111111111111111111111111111111111111122222222222333333333333333333344444444444
                <img src="images/rq.png"/>
            </span>
        </div>
    </div>
</body>
</html>


rq.png & lq.png are 16x16 images created using Terbuchet MS font & Alt+0147, Alt+0148 sequences.

Regards,
 
Share this answer
 
v3
Comments
Ravi K.Singh 18-Mar-13 3:39am    
Thanks Prasad for answer, I've already tried this but not working. The problem is ,I've two quote images before and after string text and if length of string be too long then quote images no behaving in actula position.
I want something like this structure :-

<img_quote_start>a_long_string_here_a_long_string_here_a_long_string_here
a_long_string_here_a_long_string_here_a_long_string_here_a_lo
ng_string_here_a_long_string_here_a_long_string_here_a_long_s
tring_here<img_quote_end>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900