Jump to content


Photo

html probelm


  • Please log in to reply
17 replies to this topic

#1 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 14 August 2006 - 05:06 PM



look at that link see that top box post box i have set the width as 80% but when i display a post it just keeps going off the pafe ive tried
css
.post2 { width: 80%; }
and html
<table border='0' class=post2' width='80%'>
but it just keeps going off ive tried
<p></p> <div></div> around it im just lost any ideas on how to control the size


#2 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 14 August 2006 - 05:07 PM

getting a message that i have to log in... can't see the post :?
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#3 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 14 August 2006 - 05:12 PM

http://ca3.php.net/wordwrap

Properly applied, that will force breaks in overly long words (like the nonsense post you have)
Legend has it that reading the manual never killed anyone.
My site

#4 Chetan

Chetan
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts
  • LocationIndia

Posted 14 August 2006 - 05:14 PM

desithugg, that name makes me laugh, thats sumthin in my lang.
Pokemon RPG well youll hav 2 make it too gud, there are many,
can't see your code, its huge, make sure you dun use <pre> tags.
I am a PHP Guru, ask me questions if you want to

#5 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 14 August 2006 - 05:14 PM

kk il check it out lol that nonsense post was just a test to see if it goes off the page

#6 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 14 August 2006 - 05:17 PM

desithugg, that name makes me laugh, thats sumthin in my lang.
Pokemon RPG well youll hav 2 make it too gud, there are many,
cunt see your code, its huge, make sure you dun use <pre> tags.

o.o it was good i had released v.1 bout 6 days ago and

There is a total of 750 registerd members.
There is a total of 2430 pokemon.
and bout 3000 posts but due to some glitches and bandwith problems i decided to start off and fix the glitches in another site and transfere

#7 Chetan

Chetan
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts
  • LocationIndia

Posted 14 August 2006 - 05:20 PM

Ohk, what I meant was youll have to make it better than atleast pokemoncrater.com so ppl play it much, it isnt even famous among my frends~~

I am a PHP Guru, ask me questions if you want to

#8 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 14 August 2006 - 05:25 PM

yup lol.I tried to be as creative as i could.Took me a while but i got throught it.
you know how the crater maps are right?navigation and stuff
i added a lil twist to it you navigate person moves and you can go inside caves :)
http://tpfrpg.byethost32.com/index.php
some glitches in the forums but i have fixed them on the new site.relesing again and transfering in bout a week.

#9 Chetan

Chetan
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts
  • LocationIndia

Posted 14 August 2006 - 05:34 PM

Ill register.
Well the desi in your name makes me laugh it means sumthin kinda funny
I am a PHP Guru, ask me questions if you want to

#10 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 14 August 2006 - 05:34 PM

hey guys its still not working
<?
$post = "dsfgfdfdgdfsadddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd";
$post2 = wordwrap($post, 20, "<br>");
$post3 = nl2br($post2);
?>
and Rocking Groudoun where are u from lol

#11 Chetan

Chetan
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts
  • LocationIndia

Posted 14 August 2006 - 05:42 PM

Delhi, India

$post2 = wordwrap($post, "/n", 20);
I am a PHP Guru, ask me questions if you want to

#12 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 14 August 2006 - 05:45 PM

Delhi, India

$post2 = wordwrap($post, "/n", 20);

Warning: wordwrap() expects parameter 2 to be long, string given in /usr/home/osiris/domains/x3teamz.net/public_html/pi/members/3100923886sas/forums/post.php on line 136
o.o srry to keep othering u guys

#13 Chetan

Chetan
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts
  • LocationIndia

Posted 14 August 2006 - 05:47 PM

$post2 = wordwrap($post, 20, "<br />\n");

Directly from my copy of php manua;, btw where are you from?
I am a PHP Guru, ask me questions if you want to

#14 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 14 August 2006 - 05:51 PM

from pakistan lol but not much different

#15 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 14 August 2006 - 05:53 PM

uhhhhhhh it doesnt give the error any more but it doesnt split up the line either i tried replacing /n with <br / > but nothing

#16 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 14 August 2006 - 05:55 PM

never mind got it
$post2 = wordwrap($post, 20, "<br />\n", 1);

#17 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 14 August 2006 - 06:32 PM

http://ca3.php.net/wordwrap

Properly applied, that will force breaks in overly long words (like the nonsense post you have)


"Properly applied" - the second example on that page would have solved this in seconds :)
Legend has it that reading the manual never killed anyone.
My site

#18 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 14 August 2006 - 07:42 PM

Use the 4th argument

$post2 = wordwrap($post, 20, "\n", true);
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users