Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-20-2008, 03:19 AM   PM User | #1
PDiddy
New to the CF scene

 
Join Date: Feb 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
PDiddy is an unknown quantity at this point
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
Click image for larger version

Name:	on left.jpg
Views:	85
Size:	38.5 KB
ID:	6064  
PDiddy is offline   Reply With Quote
Old 02-20-2008, 03:24 AM   PM User | #2
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
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
rangana is offline   Reply With Quote
Old 02-20-2008, 03:27 AM   PM User | #3
PDiddy
New to the CF scene

 
Join Date: Feb 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
PDiddy is an unknown quantity at this point
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?
PDiddy is offline   Reply With Quote
Old 02-20-2008, 03:35 AM   PM User | #4
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
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
rangana is offline   Reply With Quote
Old 02-20-2008, 03:45 AM   PM User | #5
PDiddy
New to the CF scene

 
Join Date: Feb 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
PDiddy is an unknown quantity at this point
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!
PDiddy is offline   Reply With Quote
Old 02-20-2008, 04:23 AM   PM User | #6
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
You're completely welcome! Glad to help
rangana is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:29 PM.


Advertisement
Log in to turn off these ads.