473,385 Members | 1,798 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 1098
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: 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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.