Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I use Frontpage Express XP version for editing my websites. My outpage is http://www.cleddau.com/guestbookview.html
I'm looking for a way to restrict the number of characters that are displayed on a line so that readers don't have to scroll to the right to read long entries. I can't find how to do this in the Form Field Properties. I can restrict the number of characters in total but I don't want to do that. Does anyone know how I might get around this?

Each entry in your guestbook has a [pre] tag around it. This tells the browser that the text is preformatted and not to wrap it, to display every hard return and space, etc.
If you get the [pre] tag out of there, the browser will do the rest.
If you want to limit how many characters are on a line, and not have the browser do it for you, exchange PRE with DIV and set the style attribute to a specified width:
<DIV style='width: 300px'>
</DIV>Get the idea?
Good luck,
-SN

I just realized...The reason the PRE is on there in the first place is because without it, people won't have any way to separate their paragraphs without putting a [BR] tag in there. You may want to have something either client side (javascript) or server side (probably ASP) that takes their entry and replaces \n with [BR] ([] replaced with <>.) This is a much better way of doing it than using PRE.
-SN

The PRE tag is fairly close to the vilest of HTML. Don't bother forcing line breaks in stored text. Instead use something like CSS at the presentation layer. Maybe define a div box with a limited size. The text will automatically break along the invisible lines of the box. You can also use tables to achieve this. With your website, both are sufficiently simple.
The CSS would look like this:
.commentbox
{
width: 750px; /*Good size for 800x600 resolution*/
}Just make all the comment fields in the HTML [div class=".commentbox"] or [p class=".commentbox"]. Add the link tag in the head of the HTML page like so (putting the above CSS in a file named "style.css"):
[LINK REL=StyleSheet HREF="style.css" TYPE="text/css"]

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |