PDA

View Full Version : really stupid question


sjc_unique
09-05-2002, 07:10 PM
so sorry to have to ask this, but i need to center my images and for some reason all the ways i have tried dont seem to work!

i have added align=center to the table, the cell, the image, have even tried css also. all with no joy.

i have a table within a table, and the cell is inserted using php. I assume the problem may lie with the order the code is read.

any solutions people??

thanks,

an embarrased SJC

redhead
09-05-2002, 07:25 PM
hmmmm.... sounds a little odd, can you post your code?

sjc_unique
09-05-2002, 07:31 PM
ok, here's the table that is shown:

<html>
<table cellpadding=2 cellspacing=0 border=0 align=center width=351>
<tr>
<td>
<h2>Davey Giles</h2>
<h3>Lead and rhythm Guitar. Backing Vocals.</h3>
<p>Davey Giles comes across as the head of Contraban, although I think thats merely his loud character!
<p align=center><img src="daveyg.jpg" align=center>
</td>
</tr>
</table>
</html>

as you can see 3 align=center's and none of them seem to align the image!!

Catman
09-05-2002, 08:57 PM
Could be because you don't have the </p> -- but perhaps you could simply change the <td> to a <th> to solve the problem. If you don't want the text in bold, just put the image inside a <th> cell on the next row.

sjc_unique
09-05-2002, 09:05 PM
genious!! thanks catman.

<th> works. although not sure what it is!!

SJC

Nightfire
09-05-2002, 10:56 PM
Don't forget your <body></body> tags

sjc_unique
09-06-2002, 09:43 PM
hahaha!! <body> tags arent really essential. especially when the page is just loading up as a .php file. but i see ur thinking.


SJC

redhead
09-06-2002, 09:53 PM
Originally posted by sjc_unique
hahaha!! <body> tags arent really essential. especially when the page is just loading up as a .php file.

:eek::eek::eek::eek::eek::eek:

Ok... either... that the biggest typo ever to be done, or you need to spend a little more time at w3.org (http://www.w3.org)...

the code that is to be sent to the browser, whether generated by php or just written in notepad, in order to be valid must contain <html> tags, <head> tags, (poss. <title>?) and <body> tags. It doesnt matter whether its php or not... the code sent to the browser is what matters

sjc_unique
09-06-2002, 10:01 PM
what do u mean valid?

do u mean for it to be legal that i need to include all the tags or what?

cos i dont use the tags for any of my pages and the website is running perfect!

let me know

SJC