Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make div length elastic based on the length of text?

Status
Not open for further replies.

collegian

Programmer
Jul 1, 2010
64
US
Hello,

I have some content in div tags.I want to make the div elastic based on the length of the text so that the text doesn't spill out of the div tag.
I am attaching a file in which I want the width of the div "wrapper" to be dynamic based on length of the content in the content placeholder.

Thanks.
 
You'll get a better response by showing your rendered HTML/CSS markup in the HTML/CSS forum as the display of the page doesn't have anything to do with ASP.NET.

However, as a quick bit of advice, remove the height from your wrapper as by their very nature div elements will expand to contain the content you put in them (unless elements are taken out of the document flow with floating or absolute positioning).

Mark,

Darlington Web Design[tab]|[tab]Experts, Information, Ideas & Knowledge[tab]|[tab]ASP.NET Tips & Tricks
 
I apologize for having posted in the wrong forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top