Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8631651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:14:51+00:00 2026-06-12T09:14:51+00:00

I have a substring what contains HTML tag and I need to shorten it

  • 0

I have a substring what contains HTML tag and I need to shorten it but display it with the same formatting as it appears on the string.

It doesn’t have to be exactly X characters long, but it should be short enough to be displayed inside a panel with a certain width and height?

Is there any way I can achieve this using c#?

What about using CSS? I.e. displaying the panel with a fixed height regardless of its content?

Thanks..

Example: I have the following panel containing a label that contains text with html tags:

Example

I need to remove the scroll bar without making the panel longer but keeping this height & this width..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:14:52+00:00Added an answer on June 12, 2026 at 9:14 am

    If you have following html code:

    <div class="div1"> Some Really Bold String </div>
    

    You can provide css to hide the scroll bars,

    .div { overflow:hidden; height:200px; width:200px;}
    

    height and width values are just for example purpose.
    overflow:hidden does not let the content of the div to expand out side the div.
    you will find more information on overflow here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, I need to see if a string contains a substring, so I
strange problem here that I've been pondering. I have a string that contains HTML,
Suppose I have a string which contains an HTML file. How do I get
I have a large file where each line contains a substring such as ABC123.
I have a string s and I want to search for the substring of
I have a string like myweb.com/blabla/blabla/image.jpg How could I get substring that starts at
I have a string and start and length with which to extract a substring.
How can we divide the substring from the string Like I have string String
I have a table that contains in one column a variable length delimited string
I have the following inside of my view @Html.DisplayFor(modelItem => item.FirstName) I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.