Problems with guestbook

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
Monopoly
Forum Commoner
Posts: 41
Joined: Wed May 21, 2008 1:19 pm

Problems with guestbook

Post by Monopoly »

Dear lads ,
I have written a guestbook lately , but a thing about it gets me of my nerves :banghead: .
When people post something and the posts are realy big ,well, the output on the main page isn't wraped and I get one , long string that streches the browser till I get I huge scroll bar.

Are there any ways to "wrap" the string??? :dubious:
User avatar
deeessay
Forum Commoner
Posts: 55
Joined: Sat May 24, 2008 1:02 am

Re: Problems with guestbook

Post by deeessay »

Well, you can put the output inside a text area of better yet, enclose the part where posts are displayed in a <DIV> tag
such as this one:



<div style="overflow:auto;height:435px;width:100%;padding:0px;">

---->GUESTS POSTS HERE<-----

</div>


this solves your problem with the extra long scroll bar in your browser anyway.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: Problems with guestbook

Post by Kieran Huggins »

deeessay++
User avatar
deeessay
Forum Commoner
Posts: 55
Joined: Sat May 24, 2008 1:02 am

Re: Problems with guestbook

Post by deeessay »

is that a plus point for me?

c",)


why, thank you Kieran Huggins.... :D
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: Problems with guestbook

Post by Kieran Huggins »

deeessay wrote:is that a plus point for me?
It sure is, and it's worth 426 Schrutebucks! Use them wisely ;-)

Image
User avatar
deeessay
Forum Commoner
Posts: 55
Joined: Sat May 24, 2008 1:02 am

Re: Problems with guestbook

Post by deeessay »

:lol:
Monopoly
Forum Commoner
Posts: 41
Joined: Wed May 21, 2008 1:19 pm

Post by Monopoly »

Sorry , that didn't help me at all

Any other ideeas ?
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: Problems with guestbook

Post by matthijs »

Yes.
1) post your question in the right forum (client side),
2) show the relevant code (wrapped in code html/css tags) and
3) explain what you have already tried so far.

That allows other forum members to help you better.
Monopoly
Forum Commoner
Posts: 41
Joined: Wed May 21, 2008 1:19 pm

Re: Problems with guestbook

Post by Monopoly »

aaaahhhhh

it's a matter of client-side scripting....
:banghead:
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: Problems with guestbook

Post by Kieran Huggins »

not even scripting... CSS.

The problem is one of layout, which is CSS territory. The example given should work perfectly.
User avatar
deeessay
Forum Commoner
Posts: 55
Joined: Sat May 24, 2008 1:02 am

Re: Problems with guestbook

Post by deeessay »

Monopoly, try using tables in displaying the guest posts, used in conjunction with the <div> tag i mentioned before, of course:

<div style="overflow:auto;height:435px;width:100%;padding:0px;">
<TABLE width='100%' border='0'>
<TR>
<TD>Guest's Name goes here</TD>
</TR>
<TR>
<TD>Message goes here</TD>
</TR>
....
....
....
<TR>
<TD>etc, etc, etc,</TD>
</TR>
</TABLE>
</div>


what happens is that you'll have a small window in your browser that will display the guests' posts and will have its own scroll bar.
Post Reply