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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Newb Question! Loading .php in Iframe and aligning it in the middle!

    All,

    I'm trying to load a particular contact form in a .html page. Below is my code snippet. My issue isn't actually loading the .php page as you can see below it does that, however its aligning it in the middle.

    This is the code of the .html page loading up the php page:

    Code:
    <html>
    <head>
    	<title>Test Page</title>
    </head>
    
    
    <body >
    <table width="600px" height="600px" align="center" border="0">
    <iframe frameborder="0" src="contact/form.php" align="center" width="600px" height="600px"> </iframe>
    </table>
    </body>
    </html>
    The screenshot is the result of this page where the contact form is all the way on the left. If I am to change the align tag of the iframe to be align="right" then it does move the contact form all the way to the left. Any suggestions? Thanks!
    Attached Thumbnails Attached Thumbnails Newb Question! Loading .php in Iframe and aligning it in the middle!-left.jpg  

  • #2
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    I'm not taking this right, as the screenshot is vague, anyway have you tried adding style="text-align:center;" in your <iframe> tag. See if it helps

  • #3
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry it did not make sense. Let me try again:

    There is a top menu which is centered so I want the contact form to be centered. My attachment shows it to be all the way on the left of the browser, even if all the align tags are set to the middle.

    What you showed as far as text I did not try because the text align isn't the issue, rather the entire contact form. As mentioned, if I change the align tag to equal 'right' then it does move the contact form all the way to the right of the page. What gives?

  • #4
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    So, the contact form is in the table right??..and you are calling it using <iframe> right?..Then why not add align="center" on the <td> that contains the <iframe>.

    There it goes, you don't have the <tr><td> tag, maybe it cause the problem. Try adding a <tr> and <td> tag. See if it helps

  • #5
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hmm, I had no <td> tags but after I added them it seems to work. I wasn't aware that the td tag had to be added, let alone aligned. Thanks!

  • #6
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    You're completely welcome! Glad to help


  •  

    Posting Permissions

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