1

I have a table/grid view and in the <td> there are 2 words like "C2 Sunday". I want a line break up after C2 and it appears like,

 C2
Sunday

Is it possible to do that?
Kindly help me with this.
Now it displays like "C2 Sunday" and i want like above.

ketan
  • 19,129
  • 42
  • 60
  • 98
Farrukh Liaqat
  • 116
  • 1
  • 1
  • 11

6 Answers6

1

Simply use </br> like:

<table>
<tr>
<td>C2 </br> Sunday</td>
</tr>
</table>
ketan
  • 19,129
  • 42
  • 60
  • 98
1

make a CSS rule on td and give css property word-break:break-all;

Muzamil Rafique
  • 147
  • 1
  • 12
1

Here is an example for line break:

<html>

To break lines
in a text,
use the br element.

Muzamil Rafique
  • 147
  • 1
  • 12
0

You can do something like this

<Itemtemplate>
<%# ((string)Eval("C2")).Replace("\n", "<br/>") %></Itemtemplate>

<Itemtemplate>
<%# FormatString(Eval("Sunday")) %></Itemtemplate>

Hope it helps

Nad
  • 4,605
  • 11
  • 71
  • 160
0

You Can Use HTML <br> Tag to break like C2 <br> Sunday

without Inverted Commas

Muzamil Rafique
  • 147
  • 1
  • 12
0

In my case i was using css grid I have done like this

<somegriditem>
  <div>A</div>
  <div>B</div>
</somegriditem>

In the css

{display:flex;flex-direction:column;}
Thakur Karthik
  • 3,034
  • 3
  • 15
  • 24