Reputation: 297
I am Using asp.net and i have the following Data :
Users are prohibited from posting or transmitting any unlawful, threatening,libelous, defamatory, obscene, scandalous, inflammatory, abusive, hateful, pornographic, or profane material, or any material that could constitute or encourage conduct that would be considered a criminal offense, give rise to civil liability, or otherwise violate any law. We reserve the right, in our sole and absolute discretion, to terminate, suspend or restrict your access to this Site, unilaterally and without notice, in the event you violate any of the terms of this Agreement. In addition, if asked to do so, you agree that you will not attempt to access this Site. We also reserve any and all remedies at law or equity in connection with any violation of this Agreement. You agree, at your own expense, to indemnify, defend and hold the Company (and its subsidiaries, affiliates, officers, directors, agents, employees and third parties providing content) harmless from and against any claim or demand and all losses incurred related to the use of the Site.
We use a diverse range of information, text, photographs, designs, graphics, images, sound and video recordings, animation, content, advertisement and other materials and effects (collectively "Materials") for the search services on the Media. We provide the Material through the Media FOR YOUR PERSONAL AND NON-COMMERCIAL USE ONLY.
I have tried this but the result is the text are align to left. I want to justify the text. Is there any attribute for justifying the text in asp.net using css? Please help.
Upvotes: 1
Views: 6374
Reputation: 189
I tried most suggestions and couldn't get it to work (gridview), so added a css class...
.LabelFormat
{
padding-bottom:4px
}
lame but it worked.
Upvotes: 0
Reputation: 13248
If you're using div
or p
tags then use inline style
for them as shown
<div style="text-align:justify;">Users are prohibited from posting or transmitting any unlawful, threatening,libelous, defamatory, obscene, scandalous, inflammatory, abusive, hateful, pornographic, or profane material, or any material that could constitute or encourage conduct that would be considered a criminal offense, give rise to civil liability, or otherwise violate any law. We reserve the right, in our sole and absolute discretion, to terminate, suspend or restrict your access to this Site, unilaterally and without notice, in the event you violate any of the terms of this Agreement. In addition, if asked to do so, you agree that you will not attempt to access this Site. We also reserve any and all remedies at law or equity in connection with any violation of this Agreement. You agree, at your own expense, to indemnify, defend and hold the Company (and its subsidiaries, affiliates, officers, directors, agents, employees and third parties providing content) harmless from and against any claim or demand and all losses incurred related to the use of the Site.
We use a diverse range of information, text, photographs, designs, graphics, images, sound and video recordings, animation, content, advertisement and other materials and effects (collectively "Materials") for the search services on the Media. We provide the Material through the Media FOR YOUR PERSONAL AND NON-COMMERCIAL USE ONLY.</div>
Or else try to add a stylesheet to your application and try to use the style as shown
.mytext{
text-align:justify;
}
and in your webpage you can use it as shown
<div style="mytext">your text goes here...</div>
Upvotes: 1
Reputation: 3889
Use <p style="text-align:justify;">...</p>
in your HTML. Better to define style elements in CSS
HTML
<p class="justified">...</p>
CSS
.justified {
text-align: justify;
}
If you are using Label
, you may set the HorizontalAlign
property:
<asp:Label HorizontalAlign="Justify" runat="server">
Some Content
</asp:Label>
Upvotes: 0