corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Dodgy HTML/PHP/Table problem


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Dodgy HTML/PHP/Table problem
liamC
Member

Registered: 28th Feb 04
User status: Offline
24th Jan 07 at 18:15   View User's Profile U2U Member Reply With Quote

For some reason, if I create any tables within a PHP page, applying a background colour or image background to the table simply will not work.

Is there alternative code to enable this? It is doing my head in!! All I want is a grey bastard background!!
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
24th Jan 07 at 18:18   View User's Profile U2U Member Reply With Quote

Post the code that doesnt work.
liamC
Member

Registered: 28th Feb 04
User status: Offline
24th Jan 07 at 18:19   View User's Profile U2U Member Reply With Quote

Just simple table code with a PHP page mate!

code:
<table width="100%" height="5%" border="0" cellpadding="0" cellspacing="0" bgcolor="#F2F2F2">
<tr>
<td width="43%">&nbsp;</td>
<td width="57%" valign="top" bgcolor="#F2F2F2">&nbsp;</td>
</tr>
</table>
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
24th Jan 07 at 18:24   View User's Profile U2U Member Reply With Quote

hhmm, works ok in a HTML page, unless you are using a really strict document model.

Try changing bgcolor="#F2F2F2" for this:

style="background-color:F2F2F2"
liamC
Member

Registered: 28th Feb 04
User status: Offline
24th Jan 07 at 18:30   View User's Profile U2U Member Reply With Quote

wah-fucking-hey...that's actually been grinding on me for weeks as to why that wasn't working.

I've had to define it it in the <style> at the top instead of the actual tag. Maybe a PHP thing? Works fine in the normal way in an HTML file..
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
24th Jan 07 at 18:55   View Garage View User's Profile U2U Member Reply With Quote

have you defined html content headers at the top of the page?

[Edited on 24-01-2007 by Steve]
liamC
Member

Registered: 28th Feb 04
User status: Offline
24th Jan 07 at 19:26   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Steve
have you defined html content headers at the top of the page?

[Edited on 24-01-2007 by Steve]


Don't think so?

I defined the style of the table at the top and it's fine
AndyKent
Member

Registered: 3rd Sep 05
User status: Offline
24th Jan 07 at 19:27   View User's Profile U2U Member Reply With Quote

Don't know what you know about PHP but it has nothing to do with how the browser displays stuff.

All it does it insert content where your PHP script tells it to .....it then sends the PHP page to the browser - any problems with the display are down to the HTML code not the PHP - if you get a PHP error it makes itself very obvious....
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
24th Jan 07 at 19:27   View Garage View User's Profile U2U Member Reply With Quote

add this to the top of the page

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
liamC
Member

Registered: 28th Feb 04
User status: Offline
24th Jan 07 at 19:37   View User's Profile U2U Member Reply With Quote

Ahhh...yeah, I already had that mate

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
How dodgy are you? barry_kellett99 General Chat 44 1412
4th Aug 03 at 22:10
by groom
 
Most Haunted - Living TV Tiger General Chat 12 629
1st Dec 04 at 17:32
by Tiger
 
Young wippersnappers - Website tutourials wanted. Daimo B Geek Day 28 2223
8th Dec 06 at 14:24
by Cybermonkey
 
MYSQL Problem(s) liamC Geek Day 23 993
14th Jan 07 at 14:21
by Ian
 

Corsa Sport » Message Board » Off Day » Geek Day » Dodgy HTML/PHP/Table problem 28 database queries in 0.0135260 seconds