liamC
Member
Registered: 28th Feb 04
User status: Offline
|
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
|
Post the code that doesnt work.
|
liamC
Member
Registered: 28th Feb 04
User status: Offline
|
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%"> </td>
<td width="57%" valign="top" bgcolor="#F2F2F2"> </td>
</tr>
</table>
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
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
|
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
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
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
|
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
|
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
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
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
|
Ahhh...yeah, I already had that mate
|