Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Table in php trouble :/
Old 08-22-2004, 08:37 PM Table in php trouble :/
lothop's Avatar
Ultra Talker

Posts: 303
Trades: 0
I'm making a table loop in php to display messages stored in a database, it's looping, it's displaying all the correct information, but I can't seem to get it to look any better :/

Heres the website as it looks now, http://madox.freeprohost.com/message.view.php

And here is the code which creates the table :
PHP Code:
print("<table class=\"forTexts\" align=\"center\" width=\"100\" cellpadding=\"3\" cellspacing=\"0\" border=\"1\">");
print(
"  <tr>");
print(
"    <td colspan=\"3\" class=\"forTexts\" align=\"center\">$data[username]</td>");
print(
"  </tr>");
print(
"  <tr>");
print(
"    <td width=\"4\">&nbsp;</td>");
print(
"    <td width=\"170\">$data[message]</td>");
print(
"    <td width=\"4\">&nbsp;</td>");
print(
"  </tr>");
print(
"</table>");
print(
"<br>"); 
Problems I'm having:
Cannot allocate a .css to the table (changes fonts etc.)
Cannot change the message length ->

When you look at the site, the message is massive and stretches the table. Is there a way to make part of it drop down to a different line (cuttoff point?) I tried defining the table width with pixels but didn't work.

Thats about it, unless anyone knows another problem.

Thanks,
Lothop

Last edited by lothop; 08-22-2004 at 08:39 PM..
lothop is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-23-2004, 04:07 AM
Phobz's Avatar
Novice Talker

Posts: 8
Trades: 0
Mmmm

Your <td width=170>, thats wider than the table, maybe this will stop it from wrapping.

("<table class="forTexts\" align=\", 1st line should have \"forTexts?

Not sure tho, only trying to help

Cya Paul
Phobz is offline
Reply With Quote
View Public Profile
 
Old 08-23-2004, 04:13 AM Css
Phobz's Avatar
Novice Talker

Posts: 8
Trades: 0
try using this in your css

.table_outline { border: 1px solid #000000; padding: 4px; font: normal 10px verdana; width: 600px; }

In the <table> bit do cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"table_outline\">


Hope helps u m8

Paul

Last edited by Phobz; 08-23-2004 at 05:21 AM..
Phobz is offline
Reply With Quote
View Public Profile
 
Old 08-23-2004, 12:11 PM
witchblade32's Avatar
Super Talker

Posts: 140
Location: Lititz, PA
Trades: 0
How do you know that your styles aren't working if the page isn't linking to the stylesheet and doesn't have styles embedded in the page?
__________________
When you eliminate all other possibilities, what remains, no matter how improbable, is the answer.
witchblade32 is offline
Reply With Quote
View Public Profile Visit witchblade32's homepage!
 
Old 08-23-2004, 03:17 PM
lothop's Avatar
Ultra Talker

Posts: 303
Trades: 0
Quote:
Originally Posted by witchblade32
How do you know that your styles aren't working if the page isn't linking to the stylesheet and doesn't have styles embedded in the page?
http://www.madox.co.nr

I have used the style sheet before, I've fixed the problems with the style sheet.


I've also managed to change the sizes now
Thanks.

The reason it was so long was because it was just one long word. if they are individal words, then it's the right size.

Lothop
lothop is offline
Reply With Quote
View Public Profile
 
Old 08-23-2004, 06:57 PM
DevelopedWeb's Avatar
Webmaster Talker

Posts: 610
Location: USA
Trades: 0
I was gonna say--a lot of the time one big word (really, really big) will be able to throw off the whole layout. Rarely, but it still does happen, especially in sidebars.
__________________
DevelopedWeb.com -
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
- a brand new online discussion area.
DevelopedWeb is offline
Reply With Quote
View Public Profile Visit DevelopedWeb's homepage!
 
Old 08-23-2004, 09:43 PM
dbzguy's Avatar
Ultra Talker

Posts: 345
Location: Artic
Trades: 0
id just recommend making the table with normal html and then putting it into the php to make it dynamic. that is how i always do pagination loops.
__________________

Please login or register to view this content. Registration is FREE


PHP Code:
<?PHP if(ping == true) { attackuserip(); } ?>
dbzguy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Table in php trouble :/
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24623 seconds with 12 queries