Hi Frnds,

I need your help.
I want to retain the spsces between the characters while displaying on web page.
Actually the view source shows the spaces inserted in form while filling but while displaying the spaces gets converted to single space
like e.g.
ABC DFG = ABC DFG
I am using this in Struts and I cant use <pre> as it overrides any styles applied though the css.

Please help.

Regards,
Vinod

Recommended Answers

All 2 Replies

try using <pre xml:space="preserve">

<pre> tags are the ONLY thing that will prevent browsers from stripping whitespace.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.