Search code examples
anchorcfloop

How to split the query column value into two line inside of anchor tag using coldfusion?


I've cfquery loop, then I've displayed the one query column value(Text) into anchor tag.

For Example

<cfloop query="testQuery">
   <a href="##">#testQuery.Title#</a>
</cfloop>

Assume that testQuery.Title variable is return "Defines an explanation/pronunciation of characters (for East Asian typography)" But I need to break the sentence for Example

"Defines an explanation/pronunciation of
characters (for East Asian typography)"


Solution

  • Just put the link into a wrapper and set some width.

    <cfloop query="testQuery">
      <div style="width:200px !important"><a href="##">#testQuery.Title#</a></div>
    </cfloop>
    

    Let me know if you have any more problem/it is not working.