473,385 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

layout question

some times there are very long urls in my page content that is pulled from a
database, it will mess up the page layout since there's no break or space in
the long word. Is there a way in html or css to fix this problem? or do i
have to write a script that finds all words in my string that are longer
than 50 characters and truncate them?

Howard
Oct 31 '05 #1
2 1097
Mr Howard you can write a function like below and make use of Substring:-
Protected Function CheckLength(ByVal Name As String) As String
If ProductName.ToString().Length > 18 Then
Return ProductName.Substring(0, 18) & "..."
Else
Return ProductName.ToString()
End If

End Function

Hope that helps
Patrick

"Howard" <ho*******@yahoo.com> wrote in message
news:ej**************@TK2MSFTNGP15.phx.gbl...
some times there are very long urls in my page content that is pulled from a database, it will mess up the page layout since there's no break or space in the long word. Is there a way in html or css to fix this problem? or do i
have to write a script that finds all words in my string that are longer
than 50 characters and truncate them?

Howard

Oct 31 '05 #2
Are you displaying a URL link on your web page with the full URL as the link
text?

If so, one solution is to set up your database so that you have a URL and a
DESCRIPTION field. Make the description a reasonable length and make it
required. When the user enters a new URL they will have to put in a
reasonable description that will be displayed.

"Howard" <ho*******@yahoo.com> wrote in message
news:ej**************@TK2MSFTNGP15.phx.gbl...
some times there are very long urls in my page content that is pulled from a database, it will mess up the page layout since there's no break or space in the long word. Is there a way in html or css to fix this problem? or do i
have to write a script that finds all words in my string that are longer
than 50 characters and truncate them?

Howard

Nov 4 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

82
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | ...
8
by: T. Bjarne | last post by:
I'm writing a form with a grid layout (similar to the ones in phpMyAdmin). The form will contain X number of columns and Y rows - all cells containg INPUT elements. As long as the data isn't...
3
by: John | last post by:
Hi, This is my first experiment with C#, I'm trying to handle the resize event. According to the documentation I should handle the Layout event for this. My question is: how do I register this...
4
by: NWx | last post by:
Hi, I develop an ASP.NET app which should be used from Internet, so I don't have control over what browsers will be used. I don't want to target every possible users, so I don't really mind is...
10
by: Volker Lenhardt | last post by:
For a QApplication (PyQt) on the small screen of my Zaurus 5500 PDA I try to layout my data output in a QScrollView as the central widget. I'd prefer to use QGridLayout, but cannot add it to the...
7
by: David Veeneman | last post by:
I'm just getting started with ASP.NET in Visual Studio 2005. The last web work I did involved ASP 3.0 in FrontPage. I've been through the MSDN tutorials on creating web pages, but not of them...
9
by: neoswf | last post by:
hey guys ive looked at http://news.google.com page code layout, and ive seen that the page layout is table based. the containers are tables, the hidden personalization panels are also in...
7
by: Trammel | last post by:
Im trying to do something which I hoped would be alot easier than it seems. Im trying to design the layout of the page in CSS to avoid table, etc but having problems making the bottom "fade"...
15
by: Gary Peek | last post by:
Can anyone tell us the browsers/versions that exhibit errors when tables are nested too deeply? And how many levels of nesting produces errors? (not a tables vs CSS question)
5
by: Ed Sproull [MSFT] | last post by:
First I'm pretty new to ASP.NET and I'm having a simple problem. I have small website with a header, sidebar and the the content. I want my content to appear beside my sidebar which seems to be a...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.