• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

why wont this iframe play ball?..


bigdave

Moderator
Staff member
#1
I'm working on producing my other half's new website but for the time being have put together a simple holding page and a linked contact page using a php contact form I downloaded and tweaked to suit my needs. problem is, I now cant get the form to sit where I'd like on the page. It's not far off but I feel like I've tried everything to drop it down a further 10px from it's current location but I just cant get the flipping thing to move! any ideas where I've gone wrong?

the page in question is Glmour | Contact us
 
#2
cant really make much out with only seeing

<div id="frame1" align="center" >
<iframe src="/contact/contactus.php" frameborder='0' width='373' height='450'></iframe>
</div>

from that it looks fine can you copy and paste the code from the iframe/php and ill have a look.

if all fails (and yes it will be a desperate act) use a table?
 

bigdave

Moderator
Staff member
#3
cheers,

I don't understand php (this was one I downloaded) but here's the code:

<form id='contactus' action='<?php echo $formproc->GetSelfScript(); ?>' method='post' accept-charset='UTF-8'>
<fieldset >
<legend>Contact us</legend>

<input type='hidden' name='submitted' id='submitted' value='1'/>
<input type='hidden' name='<?php echo $formproc->GetFormIDInputName(); ?>' value='<?php echo $formproc->GetFormIDInputValue(); ?>'/>
<input type='text' class='spmhidip' name='<?php echo $formproc->GetSpamTrapInputName(); ?>' />

<div class='short_explanation'>* required fields</div>

<div><span class='error'><?php echo $formproc->GetErrorMessage(); ?></span></div>
<div class='container'>
<label for='name' >Your Full Name*: </label><br/>
<input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name') ?>' maxlength="50" /><br/>
<span id='contactus_name_errorloc' class='error'></span>
</div>
<div class='container'>
<label for='email' >Email Address*:</label><br/>
<input type='text' name='email' id='email' value='<?php echo $formproc->SafeDisplay('email') ?>' maxlength="50" /><br/>
<span id='contactus_email_errorloc' class='error'></span>
</div>

<div class='container'>
<label for='message' >Message:</label><br/>
<span id='contactus_message_errorloc' class='error'></span>
<textarea rows="10" cols="50" name='message' id='message'><?php echo $formproc->SafeDisplay('message') ?></textarea>
</div>



<div class='container'>
<input type='submit' name='Submit' value='Submit' />
</div>

</fieldset>
</form>
<!-- client-side Form Validations:
Uses the excellent form validation script from JavaScript-coder.com-->

<script type='text/javascript'>
// <![CDATA[

var frmvalidator = new Validator("contactus");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();
frmvalidator.addValidation("name","req","Please provide your name");

frmvalidator.addValidation("email","req","Please provide your email address");

frmvalidator.addValidation("email","email","Please provide a valid email address");

frmvalidator.addValidation("message","maxlen=2048","The message is too long!(more than 2KB!)");

// ]]>
</script>
 

bigdave

Moderator
Staff member
#4
I've sussed it!!

In my CSS I'd put

iframe.frame1 {
margin-left: auto;
margin-right: auto;
position: relative;
top: 12px;



so the iframe was being styled by the inline width and alignment but not by the id tag. Changed it to the following and it's all better now...


#frame1 {
margin-left: auto;
margin-right: auto;
position: relative;
top: 12px;