Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    really stupid question

    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

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmmmm.... sounds a little odd, can you post your code?
    redhead

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!!

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ames, IA, USA
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Need more emoticons?
    Visit Catman's Private Stock

  • #5
    New Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts
    genious!! thanks catman.

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

    SJC

  • #6
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Don't forget your <body></body> tags

  • #7
    New Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hahaha!! <body> tags arent really essential. especially when the page is just loading up as a .php file. but i see ur thinking.


    SJC

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by sjc_unique
    hahaha!! <body> tags arent really essential. especially when the page is just loading up as a .php file.


    Ok... either... that the biggest typo ever to be done, or you need to spend a little more time at 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
    redhead

  • #9
    New Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •